#include <FXRex.h>
When parsing a regular expression pattern, the mode parameter is the bitwise OR of a set of flags and affects the match algorithm. Passing the flag REX_CAPTURE enables capturing parentheses and back references. The flag REX_ICASE enables case-insensitive matching. When the flag REX_NEWLINE is passed, newlines are treated like normal characters; otherwise, newline is NOT matched except when explicitly part of a character class. The flag REX_VERBATIM disables all special character interpretation.
When matching a compiled pattern, the mode parameter is the bitwise OR of a set of flags that affects how the match is performed. Passing the flag REX_BACKWARD causes the match to proceed backwards through the subject string. Passing the flags REX_NOT_BOL and/or REX_NOT_EOL causes the begin and end of the subject string NOT to be considered a line start or line end. The flag REX_NOT_EMPTY causes a match to fail if the empty string was matched.
Definition at line 100 of file FXRex.h.
Public Member Functions | |
FXRex () | |
FXRex (const FXRex &orig) | |
FXRex (const FXchar *pattern, FXint mode=REX_NORMAL, FXRexError *error=NULL) | |
FXRex (const FXString &pattern, FXint mode=REX_NORMAL, FXRexError *error=NULL) | |
FXRex & | operator= (const FXRex &orig) |
bool | empty () const |
FXRexError | parse (const FXchar *pattern, FXint mode=REX_NORMAL) |
FXRexError | parse (const FXString &pattern, FXint mode=REX_NORMAL) |
bool | match (const FXchar *string, FXint len, FXint *beg=NULL, FXint *end=NULL, FXint mode=REX_FORWARD, FXint npar=1, FXint fm=0, FXint to=2147483647) const |
bool | match (const FXString &string, FXint *beg=NULL, FXint *end=NULL, FXint mode=REX_FORWARD, FXint npar=1, FXint fm=0, FXint to=2147483647) const |
bool | operator== (const FXRex &rex) const |
bool | operator!= (const FXRex &rex) const |
~FXRex () | |
Static Public Member Functions | |
static FXString | substitute (const FXchar *string, FXint len, FXint *beg, FXint *end, const FXString &replace, FXint npar=1) |
static FXString | substitute (const FXString &string, FXint *beg, FXint *end, const FXString &replace, FXint npar=1) |
static const FXchar * | getError (FXRexError err) |
Friends | |
FXAPI FXStream & | operator<< (FXStream &store, const FXRex &s) |
FXAPI FXStream & | operator>> (FXStream &store, FXRex &s) |