yast2-core
Public Member Functions | Public Attributes | List of all members
RegexMatch Class Reference

#include <IniParser.h>

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
rxa compiled regex
sa string to match
nmatchhow many rm_matches to reserve

References Regex::regex().

Member Function Documentation

RegexMatch::operator bool ( )
inline

did the string match

const string& RegexMatch::operator[] ( size_t  i)
inline
Returns
i-th match

Member Data Documentation

vector<string> RegexMatch::matches

Matched subexpressions (0 - the whole regex)

Referenced by IniParser::parse_helper().

string RegexMatch::rest

The unmatched part of the string

Referenced by IniParser::parse_helper().


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

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