Go to the documentation of this file.
123 inline explicit wordRe(
const char* str);
126 inline explicit wordRe(
const std::string& str);
129 inline explicit wordRe(
const string& str);
157 inline static bool meta(
char c);
162 inline static bool valid(
char c);
165 inline static bool isPattern(
const std::string& str);
187 inline void uncompile(
bool adjust =
false);
209 inline bool match(
const std::string& text,
bool literal=
false)
const;
225 inline bool operator()(
const std::string& text)
const;
241 inline void operator=(
const string& str);
245 inline void operator=(
const std::string& str);
260 Istream&
operator>>(Istream& is, wordRe& val);
263 Ostream&
operator<<(Ostream& os,
const wordRe& val);
Combined DETECT and ICASE.
A class for handling words, derived from Foam::string.
static bool valid(char c)
Is this character valid for a wordRe?
void operator=(const wordRe &str)
Copy assignment, retaining type (literal or regex)
Detect if the string contains meta-characters.
Ostream & info(Ostream &os) const
Output some basic info.
Istream & operator>>(Istream &, directionInfo &)
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
bool compile()
Compile the regular expression.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
A class for handling keywords in dictionaries.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Wrapper around C++11 regular expressions.
void set(const std::string &str, const compOption opt=DETECT)
Copy string, auto-test for regular expression or other options.
string quotemeta() const
Return a string with quoted meta-characters.
Ignore case in regular expression.
Combined REGEX and ICASE.
void clear()
Clear string and regular expression.
bool isLiteral() const
The wordRe is treated as literal string, not as pattern.
const dimensionedScalar c
Speed of light in a vacuum.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static bool meta(char c)
Is this a meta character?
void uncompile(bool adjust=false)
Make wordRe a literal again, instead of a regular expression.
bool operator()(const std::string &text) const
Perform smart match on text, as per match()
bool match(const std::string &text, bool literal=false) const
Smart match as regular expression or as a string.
compOption
Enumeration with compile options.
bool isPattern() const
The wordRe is treated as a pattern, not as literal string.
void swap(wordRe &str)
Swap contents. Self-swapping is a no-op.