68#ifndef Foam_regExpCxx_H
69#define Foam_regExpCxx_H
89 enum ctrlType { EMPTY = 0, NORMAL = 1, NEGATED = 2 };
105 static inline std::regex::flag_type syntax();
108 bool set_pattern(
const char* pattern,
size_t len,
bool ignoreCase);
135 inline static bool is_meta(
const char c)
noexcept;
140 const std::string& str,
141 const char quote =
'\\'
157 bool operator()(
const std::string&
s,
const char q =
'\\')
const
179 const bool ignoreCase =
false
185 const std::string& pattern,
186 const bool ignoreCase =
false
212 inline
unsigned ngroups() const;
215 inline
bool nocase() const;
229 inline
bool set(const
char* pattern,
bool ignoreCase=false);
233 inline
bool set(const std::
string& pattern,
bool ignoreCase=false);
242 inline std::
string::
size_type find(const std::
string& text) const;
246 inline
bool match(const std::
string& text) const;
256 inline
bool search(const std::
string& text) const;
262 inline
bool operator()(const std::
string& text) const;
265 inline
void operator=(const
regExpCxx& rgx);
272 inline
void operator=(const
char* pattern);
276 inline
void operator=(const std::
string& pattern);
286#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).
unsigned ngroups() const
The number of capture groups for a non-empty, non-negated expressions.
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))