xbmc
|
Public Types | |
enum | studyMode { NoStudy = 0, StudyRegExp = 1, StudyWithJitComp } |
enum | utf8Mode { autoUtf8 = -1, asciiOnly = 0, forceUtf8 = 1 } |
Public Member Functions | |
CRegExp (bool caseless=false, utf8Mode utf8=asciiOnly) | |
CRegExp (bool caseless, utf8Mode utf8, const char *re, studyMode study=NoStudy) | |
Create new CRegExp object and compile regexp expression in one step. More... | |
CRegExp (const CRegExp &re) | |
bool | RegComp (const char *re, studyMode study=NoStudy) |
Compile (prepare) regular expression. More... | |
bool | RegComp (const std::string &re, studyMode study=NoStudy) |
Compile (prepare) regular expression. More... | |
int | RegFind (const char *str, unsigned int startoffset=0, int maxNumberOfCharsToTest=-1) |
Find first match of regular expression in given string. More... | |
int | RegFind (const std::string &str, unsigned int startoffset=0, int maxNumberOfCharsToTest=-1) |
Find first match of regular expression in given string. More... | |
std::string | GetReplaceString (const std::string &sReplaceExp) const |
int | GetFindLen () const |
int | GetSubCount () const |
int | GetSubStart (int iSub) const |
int | GetSubStart (const std::string &subName) const |
int | GetSubLength (int iSub) const |
int | GetSubLength (const std::string &subName) const |
int | GetCaptureTotal () const |
std::string | GetMatch (int iSub=0) const |
std::string | GetMatch (const std::string &subName) const |
const std::string & | GetPattern () const |
bool | GetNamedSubPattern (const char *strName, std::string &strMatch) const |
int | GetNamedSubPatternNumber (const char *strName) const |
void | DumpOvector (int iLog) |
bool | IsCompiled (void) const |
Check is RegExp object is ready for matching. More... | |
CRegExp & | operator= (const CRegExp &re) |
Static Public Member Functions | |
static bool | IsUtf8Supported (void) |
static bool | AreUnicodePropertiesSupported (void) |
static bool | LogCheckUtf8Support (void) |
static bool | IsJitSupported (void) |
Static Public Attributes | |
static const int | m_MaxNumOfBackrefrences = 20 |
CRegExp::CRegExp | ( | bool | caseless = false , |
CRegExp::utf8Mode | utf8 = asciiOnly |
||
) |
caseless | (optional) Matching will be case insensitive if set to true or case sensitive if set to false |
utf8 | (optional) Control UTF-8 processing |
CRegExp::CRegExp | ( | bool | caseless, |
CRegExp::utf8Mode | utf8, | ||
const char * | re, | ||
studyMode | study = NoStudy |
||
) |
Create new CRegExp object and compile regexp expression in one step.
caseless | Matching will be case insensitive if set to true or case sensitive if set to false |
utf8 | Control UTF-8 processing |
re | The regular expression |
study | (optional) Controls study of expression, useful if expression will be used several times |
|
inline |
Check is RegExp object is ready for matching.
bool CRegExp::RegComp | ( | const char * | re, |
studyMode | study = NoStudy |
||
) |
Compile (prepare) regular expression.
re | The regular expression |
study | (optional) Controls study of expression, useful if expression will be used several times |
|
inline |
Compile (prepare) regular expression.
re | The regular expression |
study | (optional) Controls study of expression, useful if expression will be used several times |
int CRegExp::RegFind | ( | const char * | str, |
unsigned int | startoffset = 0 , |
||
int | maxNumberOfCharsToTest = -1 |
||
) |
Find first match of regular expression in given string.
str | The string to match against regular expression |
startoffset | (optional) The string offset to start matching |
maxNumberOfCharsToTest | (optional) The maximum number of characters to test (match) in string. If set to -1 string checked up to the end. |
|
inline |
Find first match of regular expression in given string.
str | The string to match against regular expression |
startoffset | (optional) The string offset to start matching |
maxNumberOfCharsToTest | (optional) The maximum number of characters to test (match) in string. If set to -1 string checked up to the end. |