60 inline static label first_match
63 const std::string& text,
64 const bool literal=
false
75 const std::string& text
111 inline bool match(
const std::string& text,
bool literal=
false)
const;
126 template<
class StringType>
137 inline bool operator()(
const std::string& text)
const;
149 inline bool empty()
const noexcept;
153 inline bool operator()(
const std::string& text)
const;
184 inline bool empty()
const noexcept;
187 inline bool operator()(
const std::string& text)
const;
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
constexpr List() noexcept
Default construct.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
compOption
Enumeration with compile options.
A List of wordRe with additional matching capabilities.
void uniq()
Filter out duplicate entries (inplace).
wordRe::compOption matched(const std::string &text) const
Smart match in the list of matchers, returning the match type.
bool operator()(const std::string &text) const
Identical to match(), for use as a predicate.
~wordRes()=default
Destructor.
labelList matching(const UList< StringType > &input, const bool invert=false) const
Return list indices for all matches.
static const wordRes & null()
Return a null wordRes - a reference to the NullObject.
bool match(const std::string &text, bool literal=false) const
Smart match as literal or regex, stopping on the first match.
static Istream & input(Istream &is, IntRange< T > &range)
labelList invert(const label len, const labelUList &map)
Create an inverse one-to-one mapping.
Functor wrapper of allow/deny lists of wordRe for filtering.
bool empty() const noexcept
Nothing defined.
bool operator()(const std::string &text) const
True if matched but not blocked.
Functor wrapper of a list of wordRe for matching.
bool empty() const noexcept
Nothing defined.
bool operator()(const std::string &text) const
True if text matches ANY of the entries.