RegexMatch Class Reference

#include <IniParser.h>

List of all members.

Public Member Functions

const string & operator[] (size_t i)
 operator bool ()
 RegexMatch (const Regex &rx, const string &s, size_t nmatch=20)

Public Attributes

vector< string > matches
string rest


Detailed Description

Tries to match a string against a regex and holds results

Constructor & Destructor Documentation

RegexMatch::RegexMatch ( const Regex rx,
const string &  s,
size_t  nmatch = 20 
) [inline]

Parameters:
rx a compiled regex
s a string to match
nmatch how many rm_matches to reserve

References matches, Regex::regex(), and rest.


Member Function Documentation

RegexMatch::operator bool (  )  [inline]

did the string match

References matches.

const string& RegexMatch::operator[] ( size_t  i  )  [inline]

Returns:
i-th match

References matches.


Member Data Documentation

vector<string> RegexMatch::matches

Matched subexpressions (0 - the whole regex)

Referenced by operator bool(), operator[](), IniParser::parse_helper(), and RegexMatch().

The unmatched part of the string

Referenced by IniParser::parse_helper(), and RegexMatch().


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

Generated on a sunny day for yast2-core by doxygen 1.5.9