9#ifndef LLDB_UTILITY_REGULAREXPRESSION_H
10#define LLDB_UTILITY_REGULAREXPRESSION_H
12#include "llvm/ADT/StringRef.h"
13#include "llvm/Support/Error.h"
14#include "llvm/Support/Regex.h"
39 llvm::StringRef
string,
40 llvm::Regex::RegexFlags flags = llvm::Regex::NoFlags);
63 bool Execute(llvm::StringRef
string,
71 llvm::StringRef
GetText()
const;
RegularExpression & operator=(RegularExpression &&rhs)=default
std::string m_regex_text
A copy of the original regular expression text.
bool IsValid() const
Test if this object contains a valid regular expression.
bool Execute(llvm::StringRef string, llvm::SmallVectorImpl< llvm::StringRef > *matches=nullptr) const
Execute a regular expression match using the compiled regular expression that is already in this obje...
llvm::Error GetError() const
Return an error if the regular expression failed to compile.
llvm::Regex m_regex
The compiled regular expression.
llvm::StringRef GetText() const
Access the regular expression text.
~RegularExpression()=default
RegularExpression(RegularExpression &&rhs)=default
RegularExpression()=default
The default constructor that initializes the object state such that it contains no compiled regular e...
RegularExpression & operator=(const RegularExpression &rhs)=default
bool operator==(const RegularExpression &rhs) const
A class that represents a running process on the host machine.