libupnpp 0.16.0
A C++ wrapper for the Portable UPnP reference library
Classes | Public Types | Public Member Functions | List of all members
MedocUtils::SimpleRegexp Class Reference

Classes

class  Internal
 

Public Types

enum  Flags { SRE_NONE = 0 , SRE_ICASE = 1 , SRE_NOSUB = 2 }
 

Public Member Functions

 SimpleRegexp (const std::string &exp, int flags, int nmatch=0)
 
 SimpleRegexp (const SimpleRegexp &)=delete
 
SimpleRegexpoperator= (const SimpleRegexp &)=delete
 
bool simpleMatch (const std::string &val) const
 Match input against exp, return true if matches.
 
std::string getMatch (const std::string &val, int i) const
 After simpleMatch success, get nth submatch, 0 is the whole match, 1 first parentheses, etc.
 
bool operator() (const std::string &val) const
 Calls simpleMatch()
 
std::string simpleSub (const std::string &input, const std::string &repl)
 Replace the first occurrence of regexp.
 
bool ok () const
 Check after construction.
 

Constructor & Destructor Documentation

◆ SimpleRegexp()

MedocUtils::SimpleRegexp::SimpleRegexp ( const std::string &  exp,
int  flags,
int  nmatch = 0 
)
Parameters
nmatchmust be >= the number of parenthesed subexp in exp

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