![]() |
Public API Reference |
![]() |
Matcher for regular expressions. More...
#include <csutil/regexp.h>
Public Member Functions | |
csRegExpMatcher (const char *pattern, bool extendedRE=false) | |
Create a new RE matcher. | |
csRegExpMatcher (const csRegExpMatcher &other) | |
Copy constructor. | |
csRegExpMatchError | Match (const char *string, int flags=0) |
Match a string against the pattern. | |
csRegExpMatchError | Match (const char *string, csArray< csRegExpMatch > &matches, int flags=0) |
Match a string against the pattern. | |
csRegExpMatcher & | operator= (const csRegExpMatcher &other) |
Assignment operator. | |
~csRegExpMatcher () | |
Destructor. |
Matcher for regular expressions.
flags
should be used for subsequent calls to Match(). csRegExpMatcher::csRegExpMatcher | ( | const char * | pattern, |
bool | extendedRE = false |
||
) |
Create a new RE matcher.
pattern | Pattern to match against. |
extendedRE | Treat the pattern as an extended regular expression, rather than as a basic regular expression. |
csRegExpMatcher::csRegExpMatcher | ( | const csRegExpMatcher & | other | ) |
Copy constructor.
Destructor.
csRegExpMatchError csRegExpMatcher::Match | ( | const char * | string, |
int | flags = 0 |
||
) |
Match a string against the pattern.
string | String against which to attempt match. |
flags | One or more of csRegExpMatchFlags. Flags are combined using the bitwise-or | operator. |
csRegExpMatchError csRegExpMatcher::Match | ( | const char * | string, |
csArray< csRegExpMatch > & | matches, | ||
int | flags = 0 |
||
) |
Match a string against the pattern.
string | String against which to attempt match. |
matches | Array receiving the locations of individual (sub)expression matches. |
flags | One or more of csRegExpMatchFlags. Flags are combined using the bitwise-or | operator. |
csRegExpMatcher& csRegExpMatcher::operator= | ( | const csRegExpMatcher & | other | ) |
Assignment operator.