Functor wrapper of allow/deny lists of wordRe for filtering. More...
Public Member Functions | |
filter (const UList< wordRe > &allow, const UList< wordRe > &deny) | |
Construct with 'allow' and 'deny' matchers. More... | |
bool | empty () const noexcept |
Nothing defined. More... | |
bool | operator() (const std::string &text) const |
True if matched but not blocked. More... | |
Functor wrapper of allow/deny lists of wordRe for filtering.
An empty 'allow' accepts everything not in 'deny'. A literal 'allow' match has higher priority than any 'deny'. A regex 'allow' match has lower priority than any 'deny'.
Example (when applied to a list of words),
input: ( abc apple test other val val1 val2 wall wall1 wall2 ) allow: ( abc def "t.*" other val val1 "wall.*" ) deny: ( "[ab].*" "t.*" other "val[0-9]" wall ) result: (abc other val val1 wall1 wall2)
Construct with 'allow' and 'deny' matchers.
Definition at line 149 of file wordResI.H.
|
inlinenoexcept |
Nothing defined.
Definition at line 165 of file wordResI.H.
|
inline |
True if matched but not blocked.
Definition at line 177 of file wordResI.H.
References wordRe::LITERAL, and wordRe::REGEX.