68 #ifndef Foam_regExpCxx_H 69 #define Foam_regExpCxx_H 88 enum ctrlType { EMPTY = 0, NORMAL = 1, NEGATED = 2 };
104 static inline std::regex::flag_type syntax();
107 bool set_pattern(
const char* pattern,
size_t len,
bool ignoreCase);
139 const std::string& str,
140 const char quote =
'\\' 156 bool operator()(
const std::string&
s,
const char q =
'\\')
const 178 const bool ignoreCase =
false 184 const std::string& pattern,
185 const bool ignoreCase =
false 211 inline
unsigned ngroups() const;
214 inline
bool nocase() const;
228 inline
bool set(const
char* pattern,
bool ignoreCase=false);
232 inline
bool set(const
std::
string& pattern,
bool ignoreCase=false);
245 inline
bool match(const
std::
string& text) const;
255 inline
bool search(const
std::
string& text) const;
261 inline
bool operator()(const
std::
string& text) const;
264 inline
void operator=(const
regExpCxx& rgx);
271 inline
void operator=(const
char* pattern);
275 inline
void operator=(const
std::
string& pattern);
285 #include "regExpCxxI.H"
bool set(const char *pattern, bool ignoreCase=false)
Compile pattern into a regular expression, optionally ignore case.
static bool is_meta(const char c) noexcept
Test if character is a regex meta-character.
unsigned ngroups() const
The number of capture groups for a non-empty, non-negated expressions.
~regExpCxx()=default
Destructor.
regExpCxx()
Default construct.
bool empty() const noexcept
True if expression is empty.
bool match(const std::string &text) const
True if the regex matches the entire text.
bool clear()
Clear expression.
bool negate(bool on) noexcept
Change pattern negation, return previous value.
graph_traits< Graph >::vertices_size_type size_type
void swap(regExpCxx &rgx)
Swap contents.
bool exists() const noexcept
True if expression is non-empty.
const dimensionedScalar c
Speed of light in a vacuum.
static int grammar
The default grammar (extended | ECMAScript).
bool search(const std::string &text) const
Return true if the regex was found within the text.
std::string::size_type find(const std::string &text) const
Find position within the text.
bool negated() const noexcept
True if pattern matching is negated.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
std::smatch results_type
Type for matches.
Wrapper around C++11 regular expressions with some additional prefix-handling. The prefix-handling is...