ARC SDK
Public Member Functions
Arc::RegularExpression Class Reference

A regular expression class. More...

#include <arc/ArcRegex.h>

Public Member Functions

 RegularExpression ()
 Default constructor.
 
 RegularExpression (std::string pattern)
 Creates a regex from a pattern string.
 
 RegularExpression (const RegularExpression &regex)
 Copy constructor.
 
 ~RegularExpression ()
 Destructor.
 
RegularExpressionoperator= (const RegularExpression &regex)
 Assignment operator.
 
bool isOk ()
 Returns true if the pattern of this regex is ok.
 
bool hasPattern (std::string str)
 Returns true if this regex has the pattern provided.
 
bool match (const std::string &str) const
 Returns true if this regex matches whole string provided.
 
bool 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. More...
 
std::string getPattern () const
 Returns pattern.
 

Detailed Description

A regular expression class.

This class is a wrapper around the functions provided in regex.h.

Member Function Documentation

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.


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