|
wex v24.04.0
|
This class offers partial regular expression matching, as supported by the boost regex classes. More...
#include <wex/core/regex-part.h>
Public Types | |
| enum class | match_t { NONE , ERRORS , PART , HISTORY , FULL } |
| The match types. More... | |
Public Member Functions | |
| regex_part (const std::string ®ex, boost::regex::flag_type flags=boost::regex::ECMAScript) | |
| Constructor. | |
| const std::string & | error () const |
| Returns the error (in case match_t::ERRORS). | |
| match_t | match (char c) |
| Regular expression match using a single char at a time, possibly continuing a previous match. | |
| match_t | match_type () const |
| Returns the match type. | |
| const std::string & | regex () const |
| Returns the regex. | |
| void | reset () |
| Resets matching to start again. | |
| const std::string & | text () const |
| Returns the current text (all chars that matched). | |
This class offers partial regular expression matching, as supported by the boost regex classes.
For example a regex: *+ Settings *+ and incomplete text '* Set' would not match a normal std::regex, this class matches all *, * , * Set, * Settings *, where the first 3 would return a match_t::PART, and the last a match_t::FULL.
|
strong |
The match types.
|
inline |
Constructor.
| regex | the regular expression string |
| flags | the regex flags |
|
inline |
Regular expression match using a single char at a time, possibly continuing a previous match.
Returns the match_t: