7 #ifndef _REGULAR_EXPRESSION_CLASS_HEADER_
8 #define _REGULAR_EXPRESSION_CLASS_HEADER_
307 tVoid* m_pInternalObj;
308 tBool m_bIsCaseSensitive;
char tChar
The tChar defines the type for platform character set (platform and compiler dependent type).
void tVoid
The tVoid is always the definition for the void (non-type).
int tInt
type definition for signed integer value (platform and compiler dependent type).
bool tBool
The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent).
Regular expression argument class.
tBool FullMatch(const cStringPiece &text, const cRegularExpressionArg &ptr1=oNoArg, const cRegularExpressionArg &ptr2=oNoArg, const cRegularExpressionArg &ptr3=oNoArg, const cRegularExpressionArg &ptr4=oNoArg, const cRegularExpressionArg &ptr5=oNoArg, const cRegularExpressionArg &ptr6=oNoArg, const cRegularExpressionArg &ptr7=oNoArg, const cRegularExpressionArg &ptr8=oNoArg, const cRegularExpressionArg &ptr9=oNoArg, const cRegularExpressionArg &ptr10=oNoArg, const cRegularExpressionArg &ptr11=oNoArg, const cRegularExpressionArg &ptr12=oNoArg, const cRegularExpressionArg &ptr13=oNoArg, const cRegularExpressionArg &ptr14=oNoArg, const cRegularExpressionArg &ptr15=oNoArg, const cRegularExpressionArg &ptr16=oNoArg) const
Checks if the whole string matches.
tResult Set(const tChar *strExpression, tBool bCaseSensitive=tTrue)
Sets the regular expression string.
tInt GetNumberOfCapturingGroups() const
Returns the number of capturing groups.
static cRegularExpressionArg oNoArg
No argument.
cRegularExpression(const tChar *strExpression, tBool bCaseSensitive=tTrue)
Constructor with preset expression.
cRegularExpression(const cString &strExpression)
Constructor with preset expression.
cRegularExpression()
Default constructor.
tBool Consume(cStringPiece &input, const cRegularExpressionArg &ptr1=oNoArg, const cRegularExpressionArg &ptr2=oNoArg, const cRegularExpressionArg &ptr3=oNoArg, const cRegularExpressionArg &ptr4=oNoArg, const cRegularExpressionArg &ptr5=oNoArg, const cRegularExpressionArg &ptr6=oNoArg, const cRegularExpressionArg &ptr7=oNoArg, const cRegularExpressionArg &ptr8=oNoArg, const cRegularExpressionArg &ptr9=oNoArg, const cRegularExpressionArg &ptr10=oNoArg, const cRegularExpressionArg &ptr11=oNoArg, const cRegularExpressionArg &ptr12=oNoArg, const cRegularExpressionArg &ptr13=oNoArg, const cRegularExpressionArg &ptr14=oNoArg, const cRegularExpressionArg &ptr15=oNoArg, const cRegularExpressionArg &ptr16=oNoArg) const
Repeatedly match the front of a string.
tBool Replace(const cStringPiece &rewrite, cString *str) const
Replaces the first match of str with rewrite.
tResult Set(const cString &strExpression, tBool bCaseSensitive=tTrue)
Sets the regular expression string.
virtual ~cRegularExpression()
Destructor.
tInt GlobalReplace(const cStringPiece &rewrite, cString *str) const
Replaces all matches of str with rewrite.
tBool PartialMatch(const cStringPiece &text, const cRegularExpressionArg &ptr1=oNoArg, const cRegularExpressionArg &ptr2=oNoArg, const cRegularExpressionArg &ptr3=oNoArg, const cRegularExpressionArg &ptr4=oNoArg, const cRegularExpressionArg &ptr5=oNoArg, const cRegularExpressionArg &ptr6=oNoArg, const cRegularExpressionArg &ptr7=oNoArg, const cRegularExpressionArg &ptr8=oNoArg, const cRegularExpressionArg &ptr9=oNoArg, const cRegularExpressionArg &ptr10=oNoArg, const cRegularExpressionArg &ptr11=oNoArg, const cRegularExpressionArg &ptr12=oNoArg, const cRegularExpressionArg &ptr13=oNoArg, const cRegularExpressionArg &ptr14=oNoArg, const cRegularExpressionArg &ptr15=oNoArg, const cRegularExpressionArg &ptr16=oNoArg) const
Checks if any substring matches.
cString GetPattern() const
Returns the current pattern (expression).
cString GetError() const
Returns a string representation of the last error (if any).
cRegularExpression(const cRegularExpression &oRegExp)
Copy constructor.
tBool FindAndConsume(cStringPiece &input, const cRegularExpressionArg &ptr1=oNoArg, const cRegularExpressionArg &ptr2=oNoArg, const cRegularExpressionArg &ptr3=oNoArg, const cRegularExpressionArg &ptr4=oNoArg, const cRegularExpressionArg &ptr5=oNoArg, const cRegularExpressionArg &ptr6=oNoArg, const cRegularExpressionArg &ptr7=oNoArg, const cRegularExpressionArg &ptr8=oNoArg, const cRegularExpressionArg &ptr9=oNoArg, const cRegularExpressionArg &ptr10=oNoArg, const cRegularExpressionArg &ptr11=oNoArg, const cRegularExpressionArg &ptr12=oNoArg, const cRegularExpressionArg &ptr13=oNoArg, const cRegularExpressionArg &ptr14=oNoArg, const cRegularExpressionArg &ptr15=oNoArg, const cRegularExpressionArg &ptr16=oNoArg) const
Repeatedly match a string.
tBool Extract(const cStringPiece &rewrite, const cStringPiece &text, cString *out) const
Extracts all replaced matches of text into out.
tBool DoMatch(const cStringPiece &text, tAnchorType anchor, tInt *consumed, const cRegularExpressionArg *args, tInt n) const
Matches a string.
A common result class usable as return value throughout.
Class that represents string pieces.
#define tTrue
Value for tBool.
#define A_UTILS_D(__pclassname_)
Helper macro for d-pattern definitions.
ADTF A_UTIL Namespace - Within adtf this is used as adtf::util or adtf_util.