Homer Library
RegexMatch
A RegexMatch just stores a range expressed as 2 indices: start and end. Note that a global variable "NoMatch" is provided, and you can write:
RegexMatch my_match;Initializes the object to "no match".
RegexMatch::~RegexMatch()
does nothing.
bool IsNull() const
Returns whether the match is valid and empty. It can happen with '*' and '?' operators in a regular expression.
bool IsValid(int maxlen) const
Returns whether the match doesn't go past the maxlen limit
RegexMatch& operator=(const RegexMatch& m)
Copies a RegexMatch object
bool operator==(const RegexMatch& m) const
bool operator!=(const RegexMatch& m) const
Returns whether objects have the same or a different range.
void Print()
Prints out the indices (start and end) of the match.
This page was last updated on 12/12/99.