32 void Regexp::init(
const char* pRegExpDefinition) {
39 aHandle =
new regex_t();
41 vResult = regcomp((regex_t*)aHandle,pRegExpDefinition,REG_EXTENDED);
45 aText = pRegExpDefinition;
56 setLastError(
"Invalid use of pattern operators such as group or list.");
60 setLastError(
"Invalid use of repetition operators such as using '*' as the first character.");
80 setLastError(
"Non specific error. This is not defined by POSIX.2.");
91 setLastError(
"Invalid use of the range operator, e.g., the ending point of the range occurs prior to the starting point.");
95 setLastError(
"Compiled regular expression requires a pattern buffer larger than 64Kb. This is not defined by POSIX.2.");
103 setLastError(
"Invalid back reference to a subexpression.");
113 init(pRegExpDefinition.c_str());
117 init(pRegExpDefinition);
121 regfree((regex_t*)aHandle);
122 delete (regex_t*) aHandle;
127 bool vResult =
false;
129 vResult = (regexec((regex_t*)aHandle,pValue.c_str(),0,
nullptr,0) == 0);