67#ifndef Foam_regExpPosix_H
68#define Foam_regExpPosix_H
79template<
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);
125 inline static bool is_meta(
const char c)
noexcept
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"
graph_traits< Graph >::vertices_size_type size_type
Sub-ranges of a string with a structure similar to std::match_results, but without the underlying reg...
static bool is_meta(const char c) noexcept
Test if character is a regex meta-character.
Wrapper around POSIX extended regular expressions with some additional prefix-handling....
static bool is_meta(const char c) noexcept
Test if character is a regex meta-character.
void swap(regExpPosix &rgx)
Swap contents.
bool empty() const noexcept
Return true if a precompiled expression does not exist.
std::string::size_type find(const std::string &text) const
Find position within the text.
bool set(const char *pattern, bool ignoreCase=false)
Compile pattern into a regular expression, optionally ignore case.
bool exists() const noexcept
Return true if a precompiled expression exists.
bool match(const std::string &text) const
True if the regex matches the entire text.
bool search(const std::string &text) const
Return true if the regex was found within the text.
bool negated() const noexcept
True if pattern matching is negated.
bool clear()
Clear expression.
bool negate(bool on) noexcept
Change pattern negation, return previous value.
SubStrings< std::string > results_type
Type for matches - similar to std::smatch.
regExpPosix() noexcept
Default construct.
static bool is_meta(const std::string &str, const char quote='\\')
Test if string contains any (unquoted) meta-characters.
static int grammar
Grammar (unused) - for compatibility with Foam::regExpCxx.