Wrapper around POSIX extended regular expressions with some additional prefix-handling. The prefix-handling is loosely oriented on PCRE regular expressions and provides a simple means of tuning the expressions. More...
Public Types | |
typedef SubStrings< std::string > | results_type |
using | meta = regExpCxx::meta |
Public Member Functions | |
regExpPosix () noexcept | |
regExpPosix (const regExpPosix &)=delete | |
regExpPosix (regExpPosix &&rgx) noexcept | |
regExpPosix (const char *pattern, const bool ignoreCase=false) | |
regExpPosix (const std::string &pattern, const bool ignoreCase=false) | |
~regExpPosix () | |
bool | empty () const noexcept |
bool | exists () const noexcept |
bool | negated () const noexcept |
bool | negate (bool on) noexcept |
unsigned | ngroups () const |
bool | clear () |
void | swap (regExpPosix &rgx) |
bool | set (const char *pattern, bool ignoreCase=false) |
bool | set (const std::string &pattern, bool ignoreCase=false) |
std::string::size_type | find (const std::string &text) const |
bool | match (const std::string &text) const |
bool | match (const std::string &text, results_type &matches) const |
bool | search (const std::string &text) const |
bool | operator() (const std::string &text) const |
void | operator= (const regExpPosix &)=delete |
void | operator= (regExpPosix &&rgx) |
void | operator= (const char *pattern) |
void | operator= (const std::string &pattern) |
Static Public Member Functions | |
static bool | is_meta (const char c) noexcept |
static bool | is_meta (const std::string &str, const char quote='\\') |
Static Public Attributes | |
static int | grammar |
Wrapper around POSIX extended regular expressions with some additional prefix-handling. The prefix-handling is loosely oriented on PCRE regular expressions and provides a simple means of tuning the expressions.
The prefixes are detected as (?...) at the beginning of the regular expression. Any unknown/unsupported prefixes are silently ignored.
'i'
indicates ignore-case'!'
(exclamation) indicates negated (inverted) matchingPerl
and sed
regular expressions.Definition at line 80 of file regExpPosix.H.
typedef SubStrings<std::string> results_type |
Definition at line 108 of file regExpPosix.H.
using meta = regExpCxx::meta |
Definition at line 139 of file regExpPosix.H.
|
inlinenoexcept |
Definition at line 25 of file regExpPosixI.H.
|
delete |
|
inlinenoexcept |
Definition at line 32 of file regExpPosixI.H.
|
inlineexplicit |
Definition at line 43 of file regExpPosixI.H.
References Foam::BitOps::set().
|
inlineexplicit |
Definition at line 56 of file regExpPosixI.H.
References Foam::BitOps::set().
|
inline |
Definition at line 70 of file regExpPosixI.H.
References clear().
|
inlinestaticnoexcept |
Definition at line 120 of file regExpPosix.H.
References Foam::constant::universal::c, and regExpCxx::is_meta().
Referenced by wordRe::compile().
|
inlinestatic |
Definition at line 127 of file regExpPosix.H.
References regExpCxx::is_meta().
|
inlinenoexcept |
Definition at line 78 of file regExpPosixI.H.
|
inlinenoexcept |
Definition at line 84 of file regExpPosixI.H.
|
inlinenoexcept |
Definition at line 90 of file regExpPosixI.H.
Definition at line 96 of file regExpPosixI.H.
|
inline |
Definition at line 116 of file regExpPosixI.H.
bool clear | ( | ) |
Definition at line 128 of file regExpPosix.C.
|
inline |
Definition at line 160 of file regExpPosixI.H.
Definition at line 122 of file regExpPosixI.H.
Definition at line 134 of file regExpPosixI.H.
std::string::size_type find | ( | const std::string & | text | ) | const |
Definition at line 144 of file regExpPosix.C.
bool match | ( | const std::string & | text | ) | const |
Definition at line 187 of file regExpPosix.C.
Referenced by keyType::match(), and STARCDsurfaceFormatCore::readInpCellTable().
bool match | ( | const std::string & | text, |
results_type & | matches | ||
) | const |
|
inline |
Definition at line 145 of file regExpPosixI.H.
References Foam::ListOps::find().
|
inline |
Definition at line 173 of file regExpPosixI.H.
References Foam::stringOps::match().
|
delete |
|
inline |
Definition at line 179 of file regExpPosixI.H.
References clear().
|
inline |
Definition at line 190 of file regExpPosixI.H.
References Foam::BitOps::set().
|
inline |
Definition at line 196 of file regExpPosixI.H.
References Foam::BitOps::set().
|
static |
Definition at line 114 of file regExpPosix.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.