AnyCollect
1.1.2
|
Class used to represent an expression (regex) More...
#include <Expression.h>
Public Member Functions | |
Expression (const std::string &pattern) noexcept | |
Construct a new Expression object. More... | |
std::vector< std::shared_ptr< Matcher > > & | matchers () noexcept |
Returns the array of the receiver's matchers. More... | |
const std::vector< std::shared_ptr< Matcher > > & | matchers () const noexcept |
Returns the array of the receiver's matchers. More... | |
const std::cmatch & | apply (std::string_view::const_iterator begin, std::string_view::const_iterator end) |
Apply the regex and find matches in the given string. More... | |
Protected Attributes | |
std::regex | regex_ |
Regex object. More... | |
std::vector< std::shared_ptr< Matcher > > | matchers_ |
Matchers associated with the receiver. More... | |
Static Protected Attributes | |
static std::cmatch | match {} |
Object used to store regex matches. More... | |
Class used to represent an expression (regex)
Definition at line 33 of file Expression.h.
|
noexcept |
Construct a new Expression object.
pattern | regex string to use |
Definition at line 27 of file Expression.cc.
const std::cmatch & AnyCollect::Expression::apply | ( | std::string_view::const_iterator | begin, |
std::string_view::const_iterator | end | ||
) |
Apply the regex and find matches in the given string.
begin | iterator to the beginning of the string to match |
end | iterator to the end of the string to match |
Definition at line 40 of file Expression.cc.
|
noexcept |
Returns the array of the receiver's matchers.
Definition at line 32 of file Expression.cc.
|
noexcept |
Returns the array of the receiver's matchers.
Definition at line 36 of file Expression.cc.
|
staticprotected |
Object used to store regex matches.
Definition at line 35 of file Expression.h.
|
protected |
Matchers associated with the receiver.
Definition at line 37 of file Expression.h.
|
protected |
Regex object.
Definition at line 36 of file Expression.h.