|
|
|
|
|
|
Modules Namespace List Class Hierarchy Alphabetical List Compound List Namespace Members Compound Members Related Pages
acdk::text::RegExp Class Reference#include <RegExp.h>
Inheritance diagram for acdk::text::RegExp:
List of all members.
Detailed Description
Implements Regular Expression API: ACDK
- Author:
- Roger Rene Kommer
- Version:
- Revision
- 1.17
- Date:
- Date
- 2005/04/08 10:53:21
|
Public Member Functions |
| RegExp (IN(RString) expression, int cflags=0) |
| ~RegExp () |
virtual bool | test (IN(RString) str, int eflags=0) |
| Tests if the pattern matches at given str .
|
int | matchSize (IN(RString) text, int eflags=0) |
int | match (IN(RString) text, int *slots, int slotnum, int eflags=0) |
| returns the matching substring in slots
|
virtual RStringArray | match (IN(RString) str, int eflags=0) |
virtual RRegExpMatchPositionArray | matchPos (IN(RString) str, int eflags=0) |
RString | replace (IN(RString) text, IN(RString) with, bool replaceAll) |
Static Public Member Functions |
RString | escape (IN(RString) str) |
| Escapes all meta charakters.
|
Protected Member Functions |
int | _match (const char *it, const char *end, int *slots, int slotnum, int eflags=0) |
| returns the matching substring in slots
|
int | _matchSize (const char *it, const char *end, int eflags=0) |
Private Attributes |
int | _errorCode |
| stores the POSIX-error Code
|
pcre * | _pcre |
| from posix
|
pcre_extra * | _pcre_extra |
Constructor & Destructor Documentation
acdk::text::RegExp::RegExp |
( |
IN(RString) |
expression, |
|
|
int |
cflags = 0 |
|
) |
|
|
|
- Parameters:
-
expression | the regular expression |
cflags | a combination of RegExpCompileFlags |
|
acdk::text::RegExp::~RegExp |
( |
|
) |
|
|
Member Function Documentation
int acdk::text::RegExp::_match |
( |
const char * |
it, |
|
|
const char * |
end, |
|
|
int * |
slots, |
|
|
int |
slotnum, |
|
|
int |
eflags = 0 |
|
) |
[protected] |
|
|
returns the matching substring in slots
- Returns:
- -1 if not matching, otherwise count of filled slots return ajustes Character offset (not byte-offset of the UTF8-Stream
|
int acdk::text::RegExp::_matchSize |
( |
const char * |
it, |
|
|
const char * |
end, |
|
|
int |
eflags = 0 |
|
) |
[protected] |
|
|
Escapes all meta charakters.
|
|
- Parameters:
-
eflags | any combinations of RegExpEvaluateFlags |
- Returns:
- an StringArray: [0] substring matched [1 - n] safed expression with '()'
|
int acdk::text::RegExp::match |
( |
IN(RString) |
text, |
|
|
int * |
slots, |
|
|
int |
slotnum, |
|
|
int |
eflags = 0 |
|
) |
|
|
|
returns the matching substring in slots
- Parameters:
-
text | text to match |
slots | array of ints. slot[0] until slot[1]: match of regular expression slot[n] until slot[n + 1]: matches n'th subexpression |
slotnum | size of array slots |
- Returns:
- -1 if not matching
|
|
- Parameters:
-
eflags | any combinations of RegExpEvaluateFlags |
- Returns:
- an RegExpMatchPosition: [0] substring matched [1 - n] safed expression with '()'
|
int acdk::text::RegExp::matchSize |
( |
IN(RString) |
text, |
|
|
int |
eflags = 0 |
|
) |
|
|
virtual bool acdk::text::RegExp::test |
( |
IN(RString) |
str, |
|
|
int |
eflags = 0 |
|
) |
[virtual] |
|
|
Tests if the pattern matches at given str .
- Parameters:
-
eflags | any combinations of RegExpEvaluateFlags |
- Returns:
- true if matches
|
Member Data Documentation
|
stores the POSIX-error Code
|
|
|