67 #ifndef Foam_regExpPosix_H 68 #define Foam_regExpPosix_H 79 template<
class StringType>
class SubStrings;
90 enum ctrlType { EMPTY = 0, NORMAL = 1, NEGATED = 2 };
105 bool set_pattern(
const char* pattern,
size_t len,
bool ignoreCase);
133 const std::string& str,
134 const char quote =
'\\' 162 const
bool ignoreCase = false
168 const
std::
string& pattern,
169 const
bool ignoreCase = false
195 inline
unsigned ngroups() const;
209 inline
bool set(const
char* pattern,
bool ignoreCase=false);
213 inline
bool set(const
std::
string& pattern,
bool ignoreCase=false);
226 bool match(const
std::
string& text) const;
236 inline
bool search(const
std::
string& text) const;
242 inline
bool operator()(const
std::
string& text) const;
252 inline
void operator=(const
char* pattern);
256 inline
void operator=(const
std::
string& pattern);
266 #include "regExpPosixI.H" void swap(regExpPosix &rgx)
Swap contents.
static bool is_meta(const char c) noexcept
Test if character is a regex meta-character.
bool empty() const noexcept
Return true if a precompiled expression does not exist.
SubStrings< std::string > results_type
Type for matches - similar to std::smatch.
static bool is_meta(const char c) noexcept
Test if character is a regex meta-character.
regExpPosix() noexcept
Default construct.
bool negate(bool on) noexcept
Change pattern negation, return previous value.
Sub-ranges of a string with a structure similar to std::match_results, but without the underlying reg...
static int grammar
Grammar (unused) - for compatibility with Foam::regExpCxx.
bool set(const char *pattern, bool ignoreCase=false)
Compile pattern into a regular expression, optionally ignore case.
unsigned ngroups() const
The number of capture groups for a non-empty, non-negated expressions.
graph_traits< Graph >::vertices_size_type size_type
bool match(const std::string &text) const
True if the regex matches the entire text.
bool exists() const noexcept
Return true if a precompiled expression exists.
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.
const dimensionedScalar c
Speed of light in a vacuum.
bool negated() const noexcept
True if pattern matching is negated.
bool search(const std::string &text) const
Return true if the regex was found within the text.
bool clear()
Clear expression.
std::string::size_type find(const std::string &text) const
Find position within the text.