Go to the documentation of this file.
36 return string::meta<regExp>(str);
129 bool doCompile =
false;
137 if (string::meta<regExp>(*
this) || !string::valid<word>(*
this))
186 string::stripInvalid<word>
188 const_cast<word&
>(
static_cast<const word&
>(*
this))
204 if (literalMatch || !re_.exists())
207 return (str == *
this);
212 return re_.match(str);
219 return string::quotemeta<regExp>(*
this);
225 string::operator=(str);
232 string::operator=(str);
241 string::operator=(str);
265 string::operator=(str);
276 string::operator=(str);
284 string::operator=(str);
292 string::operator=(str);
A class for handling words, derived from string.
bool isPattern() const
Should be treated as a match rather than a literal string.
static bool isPattern(const string &)
Test string for regular expression meta characters.
bool compile() const
Compile the regular expression.
A class for handling character strings derived from std::string.
bool match(const std::string &, bool literalMatch=false) const
Smart match as regular expression or as a string.
A wordRe is a word, but can also have a regular expression for matching words.
A class for handling keywords in dictionaries.
void set(const std::string &, const compOption=DETECT)
Copy string, auto-test for regular expression or other options.
bool recompile() const
Recompile an existing regular expression.
void uncompile(const bool doStripInvalid=false) const
Frees precompiled regular expression, making wordRe a literal.
static bool meta(char)
Is this a meta character?
string quotemeta() const
Return a string with quoted meta-characters.
static bool meta(char c)
Is character a regular expression meta-character?
const word & operator=(const word &)
void clear()
Clear string and precompiled regular expression.
const dimensionedScalar c
Speed of light in a vacuum.
const wordRe & operator=(const wordRe &)
Assign copy.
compOption
Enumeration with compile options.
bool isPattern() const
Should be treated as a match rather than a literal string?