#include <RegExp.hpp>
Public Member Functions | |
| RegExp () | |
| Constructor. | |
| RegExp (const std::string &initPattern) | |
| Constructor. | |
| RegExp (const std::string &initPattern, int initOptions) | |
| Constructor. | |
| virtual | ~RegExp () |
| Destructor. | |
| virtual void | setPattern (const std::string &newPattern) |
| Set the pattern. | |
| virtual std::string | getPattern () |
| Get the pattern. | |
| virtual void | setOptions (int newOptions) |
| Set PCRE options. | |
| virtual int | getOptions () |
| Get PCRE options. | |
| virtual void | setMaxSubpatterns (unsigned int newMaxSubpatterns) |
| Set maximum number of subpatterns. | |
| virtual unsigned int | getMaxSubpatterns () |
| Get maximum number of subpatterns. | |
| virtual bool | match (const std::string &haystack, ReMatch *subPatterns=0) |
| Match pattern in a string. | |
| virtual unsigned int | matchAll (const std::string &haystack, ReMatchSet *subPatterns) |
| Match all patterns in a string. | |
| virtual bool | match (const std::string &needle, const std::string &haystack, ReMatch *subPatterns) |
| Match pattern in a string. | |
| virtual unsigned int | matchAll (const std::string &needle, const std::string &haystack, ReMatchSet *subPatterns) |
| Match pattern in a string. | |
| virtual void | replace (std::string &haystack, const std::string &replacement) |
| Replace pattern in a string. | |
| virtual void | replaceSubpatterns (std::string &haystack, const std::vector< std::string > &replacement) |
| Replace subpatterns in a string. | |
| virtual void | replaceAll (std::string &haystack, const std::string &replacement) |
| Replace all patterns in a string. | |
| virtual void | replaceAllSubpatterns (std::string &haystack, const std::vector< std::string > &replacement) |
| Replace all subpatterns in a string. | |
| virtual void | replace (const std::string &needle, std::string &haystack, const std::string &replacement) |
| Replace pattern in a string. | |
| virtual void | replaceSubpatterns (const std::string &needle, std::string &haystack, const std::vector< std::string > &replacement) |
| Replace subpatterns in a string. | |
| virtual void | replaceAll (const std::string &needle, std::string &haystack, const std::string &replacement) |
| Replace all patterns in a string. | |
| virtual void | replaceAllSubpatterns (const std::string &needle, std::string &haystack, const std::vector< std::string > &replacement) |
| Replace all subpatterns in a string. | |
Static Public Member Functions | |
| static void | createMatchMap (const ReMatch &match, const std::string &fields, const std::string &separator, const std::string &undefinedPrefix, std::map< std::string, std::string > &record) |
| Create a map of matched subpatterns. | |
| static void | createMatchMap (const ReMatch &match, const std::vector< std::string > &fields, const std::string &undefinedPrefix, std::map< std::string, std::string > &record) |
| Create a map of matched subpatterns. | |
| static void | createMatchTree (const ReMatch &match, const std::string &fields, const std::string &separator, const std::string &undefinedPrefix, Node &record) |
| Create a tree of matched subpatterns. | |
| static void | createMatchTree (const ReMatch &match, const std::vector< std::string > &fields, const std::string &undefinedPrefix, Node &record) |
| Create a tree of matched subpatterns. | |
Protected Attributes | |
| pcre * | regExp |
| PCRE object. | |
| std::string | pattern |
| The pattern. | |
| unsigned int | maxSubpatterns |
| Maximum number of subpatterns that can be matched. | |
| int | pcreOptions |
| PCRE options (see PCRE API specification). | |
Wrapper class for the Perl compatible regular expression API (PCRE).
|
|
Constructor. Construct new RegExp object. |
|
|
Constructor. Construct new RegExp object.
|
|
||||||||||||
|
Constructor. Construct new RegExp object.
|
|
|
Destructor. Destruct RegExp object. |
|
||||||||||||||||||||
|
Create a map of matched subpatterns.
Generates a map of matched subpatterns by taking keys from the
|
|
||||||||||||||||||||||||
|
Create a map of matched subpatterns.
Generates a map of matched subpatterns by taking keys from the
|
|
||||||||||||||||||||
|
Create a tree of matched subpatterns.
Generates a tree of matched subpatterns by taking keys from the
|
|
||||||||||||||||||||||||
|
Create a tree of matched subpatterns.
Generates a tree of matched subpatterns by taking keys from the
|
|
|
Get maximum number of subpatterns. Get the maximum number of subpatterns that will be returned by a matching operation.
|
|
|
Get PCRE options. Get the current PCRE options.
|
|
|
Get the pattern. Get the current pattern.
|
|
||||||||||||||||
|
Match pattern in a string.
Convenience function to match pattern
|
|
||||||||||||
|
Match pattern in a string.
Match pattern to a string. Returns true if a match is found, false otherwise. If the
|
|
||||||||||||||||
|
Match pattern in a string.
Convenience function to match all occurences of pattern
|
|
||||||||||||
|
Match all patterns in a string.
Like match(), except that all occurences of the pattern in
|
|
||||||||||||||||
|
Replace pattern in a string.
Convenience function to replace pattern
|
|
||||||||||||
|
Replace pattern in a string.
Replaces pattern in string
|
|
||||||||||||||||
|
Replace all patterns in a string.
Convenience function to replace all occurences of pattern
|
|
||||||||||||
|
Replace all patterns in a string. Like replace(), except that all occurences of the pattern are replaced.
|
|
||||||||||||||||
|
Replace all subpatterns in a string.
Convenience function to replace all occurences of subpatterns of
|
|
||||||||||||
|
Replace all subpatterns in a string. Like replaceSubpatterns(), except that all occurences of the subpatterns are replaced.
|
|
||||||||||||||||
|
Replace subpatterns in a string.
Convenience function to replace subpatterns of
|
|
||||||||||||
|
Replace subpatterns in a string.
Replaces subpatterns in string
|
|
|
Set maximum number of subpatterns. Sets the maximum number of subpatterns that will be returned by a matching operation.
|
|
|
Set PCRE options. Sets PCRE options used for matching to the specified string. As of PCRE 4.5, valid options are:
|
|
|
Set the pattern. Sets the pattern used for matching to the specified string.
|
|
|
Maximum number of subpatterns that can be matched.
|
|
|
The pattern.
|
|
|
PCRE options (see PCRE API specification).
|
|
|
PCRE object.
|
1.4.6