A regular expression class. More...
#include <ArcRegex.h>
Public Member Functions | |
RegularExpression () | |
RegularExpression (std::string pattern) | |
RegularExpression (const RegularExpression ®ex) | |
~RegularExpression () | |
RegularExpression & | operator= (const RegularExpression ®ex) |
bool | isOk () |
bool | hasPattern (std::string str) |
bool | match (const std::string &str) const |
bool | match (const std::string &str, std::list< std::string > &unmatched, std::list< std::string > &matched) const |
std::string | getPattern () const |
A regular expression class.
This class is a wrapper around the functions provided in regex.h.
bool Arc::RegularExpression::match | ( | const std::string & | str, | |
std::list< std::string > & | unmatched, | |||
std::list< std::string > & | matched | |||
) | const |
Returns true if this regex matches the string provided.
Unmatched parts of the string are stored in 'unmatched'. Matched parts of the string are stored in 'matched'. The first entry in matched is the string that matched the regex, and the following entries are parenthesised elements of the regex