Go to the documentation of this file.
60 word(std::move(static_cast<
word&>(str))),
61 re_(std::move(str.re_))
103 return !re_.exists();
146 return re_.set(*
this);
161 string::stripInvalid<word>(*
this);
176 if (!literal && re_.exists())
178 return re_.match(text);
181 return !compare(text);
bool isPattern() const noexcept
A class for handling words, derived from Foam::string.
void operator=(const wordRe &str)
@ REGEX
Regular expression.
@ DETECT
Detect if the string contains meta-characters.
bool isLiteral() const noexcept
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
static bool is_meta(const char c) noexcept
static bool valid(const char c)
static bool valid(char c)
void set(const std::string &str, const compOption opt=DETECT)
@ ICASE
Ignore case in regular expression.
bool match(const UList< wordRe > &patterns, const std::string &text)
const dimensionedScalar c
void swap(std::string &str)
void assign(Field< Tout > &result, const Field< T1 > &a, const UnaryOp &op)
bool operator()(const std::string &text) const
bool match(const std::string &text, bool literal=false) const