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);
134 inline static bool is_meta(
const char c)
noexcept;
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);
241 inline std::
string::
size_type find(const std::
string& text) const;
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"
graph_traits< Graph >::vertices_size_type size_type
Wrapper around C++11 regular expressions with some additional prefix-handling. The prefix-handling is...
std::smatch results_type
Type for matches.
bool empty() const noexcept
True if expression is empty.
regExpCxx()
Default construct.
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
True if expression is non-empty.
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.
~regExpCxx()=default
Destructor.
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.
static bool is_meta(const char c) noexcept
Test if character is a regex meta-character.
void swap(regExpCxx &rgx)
Swap contents.
static int grammar
The default grammar (extended | ECMAScript).
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))