RegExp Class Reference
A regular expression.
More...
#include <RegExp.h++>
List of all members.
Public Member Functions |
| | RegExp () throw () |
| | Construct a new RegExp.
|
| | RegExp (const RegExp &other) throw (ParseException) |
| | Copy constructor.
|
| | ~RegExp () throw () |
| | Destructor.
|
| void | setPattern (const char *pattern, bool caseInsensitive=false) throw (ParseException) |
| | Set the regular expression pattern.
|
| void | setPattern (const String &pattern, bool caseInsensitive=false) throw (ParseException) |
| | Set the regular expression pattern.
|
| String | getPattern () const |
| | Get the regular expression pattern.
|
| String | toString () const |
| | Get a String representation of the RegExp.
|
| bool | match (const char *text) const throw () |
| | Perform a pattern match against some text.
|
| bool | match (const String &text) const throw () |
| | Perform a pattern match against some text.
|
| bool | match (const char *text, RegExpMatch matches[], int numMatches) const throw () |
| | Perform a pattern match against some text, returning submatches.
|
| bool | match (const String &text, RegExpMatch matches[], int numMatches) const throw () |
| | Perform a pattern match against some text, returning submatches.
|
| RegExp & | operator= (const RegExp &other) |
| | Assignment operator.
|
| bool | isNull () const throw () |
| | Determine if this regular expression has a null pattern.
|
| bool | operator! () const throw () |
| | Determine if this regular expression has a null pattern.
|
Static Public Member Functions |
| static String | escapeMeta (const String &text) |
| | Escape all metacharacters in a String.
|
Detailed Description
A regular expression.
- Author:
- Mark Lindner
Constructor & Destructor Documentation
Member Function Documentation
Escape all metacharacters in a String.
- Parameters:
-
| text | The String to escape. |
- Returns:
- A copy of the string with all metacharacters escaped.
| String getPattern |
( |
|
) |
const [inline] |
Get the regular expression pattern.
| bool isNull |
( |
|
) |
const throw () [inline] |
Determine if this regular expression has a null pattern.
| bool match |
( |
const String & |
text, |
|
|
RegExpMatch |
matches[], |
|
|
int |
numMatches | |
|
) |
| | const throw () |
Perform a pattern match against some text, returning submatches.
- Parameters:
-
| text | The text. |
| matches | The objects in which the submatches will be recorded. |
| numMatches | The number of submatches. |
- Returns:
- true if the text matches the pattern, false otherwise.
| bool match |
( |
const char * |
text, |
|
|
RegExpMatch |
matches[], |
|
|
int |
numMatches | |
|
) |
| | const throw () |
Perform a pattern match against some text, returning submatches.
- Parameters:
-
| text | The text. |
| matches | The objects in which the submatches will be recorded. |
| numMatches | The number of submatches. |
- Returns:
- true if the text matches the pattern, false otherwise.
| bool match |
( |
const String & |
text |
) |
const throw () |
Perform a pattern match against some text.
- Parameters:
-
- Returns:
- true if the text matches the pattern, false otherwise.
| bool match |
( |
const char * |
text |
) |
const throw () |
Perform a pattern match against some text.
- Parameters:
-
- Returns:
- true if the text matches the pattern, false otherwise.
| bool operator! |
( |
|
) |
const throw () [inline] |
Determine if this regular expression has a null pattern.
Set the regular expression pattern.
- Parameters:
-
| pattern | The pattern. |
| caseInsensitive | A flag indicating whether pattern matches using this pattern should be case-insensitive. |
- Exceptions:
-
| void setPattern |
( |
const char * |
pattern, |
|
|
bool |
caseInsensitive = false | |
|
) |
| | throw (ParseException) |
Set the regular expression pattern.
- Parameters:
-
| pattern | The pattern. |
| caseInsensitive | A flag indicating whether pattern matches using this pattern should be case-insensitive. |
- Exceptions:
-
| String toString |
( |
|
) |
const [inline] |
Member Data Documentation
The documentation for this class was generated from the following files: