A class representing a regular expression that may be used for locating patterns in strings.
![]() | Constructors & destructors |
![]() | Status functions |
![]() | Compile & Execute functions |
![]() | Miscellaneous functions |
Run Time Type functions
Comparison functions
I/O functions
A class representing a regular expression that may be used for locating patterns in strings. The regular expression string is "compiled" into a form that is more efficient during the matching. This compiled form exists for the lifetime of the PRegularExpression instance.
IgnoreCase
AnchorNewLine
NotEndofLine
PRegularExpression( const PString & pattern, int flags = IgnoreCase )
flags - Pattern match options PRegularExpression( const char * cpattern, int flags = IgnoreCase )
flags - Pattern match options ~PRegularExpression()
NoMatch
BadPattern
CollateError
BadClassType
BadEscape
BadSubReg
UnmatchedBracket
UnmatchedParen
UnmatchedBrace
BadBR
RangeError
OutOfMemory
BadRepitition
PrematureEnd
TooBig
UnmatchedRParen
PString GetErrorText() const
The starts array is filled with as many matches as will fit
into the array. If the the array size is zero then it is set to at least
one for the first match found. The
substring whose start is returned in the starts array. This
will always be set to the same size as that array.
BOOL Compile( const char * cpattern, int flags = IgnoreCase )
flags - Pattern match optionsBOOL Execute( const PString & str, PINDEX & start, int flags = 0 ) const
start - First match locations
flags - Pattern match optionsBOOL Execute( const PString & str, PINDEX & start, PINDEX & len, int flags = 0 ) const
start - First match locations
len - Length of match
flags - Pattern match optionsBOOL Execute( const char * cstr, PINDEX & start, int flags = 0 ) const
start - First match locations
flags - Pattern match optionsBOOL Execute( const char * cstr, PINDEX & start, PINDEX & len, int flags = 0 ) const
start - First match locations
len - Length of match
flags - Pattern match optionsBOOL Execute( const PString & str, PIntArray & starts, int flags = 0 ) const
starts - List of match locations
flags - Pattern match optionsBOOL Execute( const PString & str, PIntArray & starts, PIntArray & ends, int flags = 0 ) const
starts - List of match locations
ends - List of match ends
flags - Pattern match optionsBOOL Execute( const char * cstr, PIntArray & starts, int flags = 0 ) const
starts - List of match locations
flags - Pattern match optionsBOOL Execute( const char * cstr, PIntArray & starts, PIntArray & ends, int flags = 0 ) const
starts - List of match locations
ends - List of match ends
flags - Pattern match options
Alphabetic index HTML hierarchy of classes or Java