ARC SDK
Public Member Functions
Arc::RegularExpression Class Reference

A regular expression class. More...

#include <arc/ArcRegex.h>

Public Member Functions

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

Detailed Description

A regular expression class.

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

Constructor & Destructor Documentation

Arc::RegularExpression::RegularExpression ( )

Default constructor.

Arc::RegularExpression::RegularExpression ( std::string  pattern)

Creates a regex from a pattern string.

Arc::RegularExpression::RegularExpression ( const RegularExpression regex)

Copy constructor.

Arc::RegularExpression::~RegularExpression ( )

Destructor.

Member Function Documentation

std::string Arc::RegularExpression::getPattern ( ) const

Returns pattern.

bool Arc::RegularExpression::hasPattern ( std::string  str)

Returns true if this regex has the pattern provided.

bool Arc::RegularExpression::isOk ( )

Returns true if the pattern of this regex is ok.

bool Arc::RegularExpression::match ( const std::string &  str) const

Returns true if this regex matches whole string provided.

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.

RegularExpression& Arc::RegularExpression::operator= ( const RegularExpression regex)

Assignment operator.

Python interface deviation
Method is unavailable in Python interface
Java interface deviation
Method is unavailable in Java interface

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