Logo Search packages:      
Sourcecode: icu version File versions  Download package

RegexMatcher Class Reference

#include <regex.h>

Inheritance diagram for RegexMatcher:

UObject UMemory

List of all members.

Detailed Description

class RegexMatcher bundles together a reular expression pattern and input text to which the expression can be applied. It includes methods for testing for matches, and for find and replace operations.

Class RegexMatcher is not intended to be subclassed.

ICU 2.4

Definition at line 648 of file regex.h.

Public Types

enum  MatcherDestIsUTextFlag { MATCHER_DEST_IS_UTEXT }

Public Member Functions

virtual RegexMatcherappendReplacement (UText *dest, UText *replacement, UErrorCode &status)
virtual RegexMatcherappendReplacement (UnicodeString &dest, const UnicodeString &replacement, UErrorCode &status)
virtual UTextappendTail (UText *dest)
virtual UnicodeStringappendTail (UnicodeString &dest)
virtual int32_t end (int32_t group, UErrorCode &status) const
virtual int32_t end (UErrorCode &status) const
virtual UBool find (int32_t start, UErrorCode &status)
virtual UBool find ()
virtual UClassID getDynamicClassID () const
virtual UTextgetInput (UText *dest) const
virtual void getMatchCallback (URegexMatchCallback *&callback, const void *&context, UErrorCode &status)
virtual int32_t getStackLimit () const
virtual int32_t getTimeLimit () const
virtual UTextgroup (int32_t groupNum, UText *dest, UErrorCode &status) const
virtual UnicodeString group (int32_t groupNum, UErrorCode &status) const
virtual UTextgroup (UText *dest, MatcherDestIsUTextFlag flag, UErrorCode &status) const
virtual UnicodeString group (UErrorCode &status) const
virtual int32_t groupCount () const
virtual UBool hasAnchoringBounds () const
virtual UBool hasTransparentBounds () const
virtual UBool hitEnd () const
virtual const UnicodeStringinput () const
virtual UTextinputText () const
virtual UBool lookingAt (int32_t startIndex, UErrorCode &status)
virtual UBool lookingAt (UErrorCode &status)
virtual UBool matches (int32_t startIndex, UErrorCode &status)
virtual UBool matches (UErrorCode &status)
virtual const RegexPatternpattern () const
 RegexMatcher (UText *regexp, UText *input, uint32_t flags, UErrorCode &status)
 RegexMatcher (const UnicodeString &regexp, const UnicodeString &input, uint32_t flags, UErrorCode &status)
 RegexMatcher (UText *regexp, uint32_t flags, UErrorCode &status)
 RegexMatcher (const UnicodeString &regexp, uint32_t flags, UErrorCode &status)
virtual RegexMatcherregion (int32_t start, int32_t limit, UErrorCode &status)
virtual int32_t regionEnd () const
virtual int32_t regionStart () const
virtual UTextreplaceAll (UText *replacement, UText *dest, UErrorCode &status)
virtual UnicodeString replaceAll (const UnicodeString &replacement, UErrorCode &status)
virtual UTextreplaceFirst (UText *replacement, UText *dest, UErrorCode &status)
virtual UnicodeString replaceFirst (const UnicodeString &replacement, UErrorCode &status)
virtual UBool requireEnd () const
virtual RegexMatcherreset (UText *input)
virtual RegexMatcherreset (const UnicodeString &input)
virtual RegexMatcherreset (int32_t index, UErrorCode &status)
virtual RegexMatcherreset ()
void resetPreserveRegion ()
virtual void setMatchCallback (URegexMatchCallback *callback, const void *context, UErrorCode &status)
virtual void setStackLimit (int32_t limit, UErrorCode &status)
virtual void setTimeLimit (int32_t limit, UErrorCode &status)
void setTrace (UBool state)
virtual int32_t split (UText *input, UText *dest[], int32_t destCapacity, UErrorCode &status)
virtual int32_t split (const UnicodeString &input, UnicodeString dest[], int32_t destCapacity, UErrorCode &status)
virtual int32_t start (int32_t group, UErrorCode &status) const
virtual int32_t start (UErrorCode &status) const
virtual RegexMatcheruseAnchoringBounds (UBool b)
virtual RegexMatcheruseTransparentBounds (UBool b)
virtual ~RegexMatcher ()

Static Public Member Functions

static UClassID U_EXPORT2 getStaticClassID ()
static void U_EXPORT2 operator delete (void *, void *) U_NO_THROW
static void U_EXPORT2 operator delete (void *p) U_NO_THROW
static void U_EXPORT2 operator delete[] (void *p) U_NO_THROW
static void *U_EXPORT2 operator new (size_t, void *ptr) U_NO_THROW
static void *U_EXPORT2 operator new (size_t size) U_NO_THROW
static void *U_EXPORT2 operator new[] (size_t size) U_NO_THROW

Private Member Functions

int64_t appendGroup (int32_t groupNum, UText *dest, UErrorCode &status) const
void backTrack (int64_t &inputIdx, int32_t &patIdx)
UBool findUsingChunk ()
void IncrementTime (UErrorCode &status)
void init (UErrorCode &status)
void init2 (UText *t, UErrorCode &e)
UBool isChunkWordBoundary (int32_t pos)
UBool isUWordBoundary (int64_t pos)
UBool isWordBoundary (int64_t pos)
void MatchAt (int64_t startIdx, UBool toEnd, UErrorCode &status)
void MatchChunkAt (int32_t startIdx, UBool toEnd, UErrorCode &status)
RegexMatcheroperator= (const RegexMatcher &rhs)
 RegexMatcher (const RegexMatcher &other)
 RegexMatcher (const RegexPattern *pat)
 RegexMatcher (const UnicodeString &regexp, const UChar *input, uint32_t flags, UErrorCode &status)
RegexMatcherreset (const UChar *input)
REStackFrame * resetStack ()
REStackFrame * StateSave (REStackFrame *fp, int64_t savePatIdx, UErrorCode &status)

Private Attributes

int64_t fActiveLimit
int64_t fActiveStart
UBool fAnchoringBounds
int64_t fAnchorLimit
int64_t fAnchorStart
int64_t fAppendPosition
const void * fCallbackContext
URegexMatchCallback * fCallbackFn
int64_t * fData
UErrorCode fDeferredStatus
REStackFrame * fFrame
int32_t fFrameSize
UBool fHitEnd
const UnicodeStringfInput
int64_t fInputLength
UBool fInputUniStrMaybeMutable
int64_t fLastMatchEnd
int64_t fLookLimit
int64_t fLookStart
UBool fMatch
int64_t fMatchEnd
int64_t fMatchStart
const RegexPatternfPattern
int64_t fRegionLimit
int64_t fRegionStart
UBool fRequireEnd
int64_t fSmallData [8]
int32_t fStackLimit
int32_t fTickCounter
int32_t fTime
int32_t fTimeLimit
UBool fTraceDebug
UBool fTransparentBounds


class RegexCImpl
class RegexPattern

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index