libzypp  13.10.6
zypp::str::regex Class Reference

Regular expression. More...

#include <Regex.h>

Public Types

enum  RegFlags { icase = REG_ICASE, nosubs = REG_NOSUB, match_extended = REG_EXTENDED }
 

Public Member Functions

 regex ()
 
 regex (const std::string &s, int flags=match_extended)
 
 ~regex () throw ()
 
 regex (const regex &rhs)
 
regexoperator= (const regex &rhs)
 
std::string asString () const
 string representation of the regular expression More...
 
regex_t * get ()
 Expert backdoor. More...
 

Private Member Functions

void assign (const std::string &s, int flags=match_extended)
 

Private Attributes

std::string m_str
 
int m_flags
 
regex_t m_preg
 
bool m_valid
 

Friends

class smatch
 
bool regex_match (const char *s, str::smatch &matches, const regex &regex)
 
bool regex_match (const char *s, const regex &regex)
 regex ZYPP_STR_REGEX More...
 

Related Functions

(Note that these are not member functions.)

bool regex_match (const char *s, smatch &matches, const regex &regex)
 Regular expression matching. More...
 
std::ostream & operator<< (std::ostream &str, const regex &obj)
 

Detailed Description

Regular expression.

Definition at line 86 of file Regex.h.

Member Enumeration Documentation

Enumerator
icase 

Do not differentiate case.

nosubs 

Support for substring addressing of matches is not required.

match_extended 

Use POSIX Extended Regular Expression syntax when interpreting regex.

Definition at line 90 of file Regex.h.

Constructor & Destructor Documentation

regex::regex ( )

Definition at line 22 of file Regex.cc.

regex::regex ( const std::string &  s,
int  flags = match_extended 
)

Definition at line 49 of file Regex.cc.

regex::~regex ( )
throw (
)

Definition at line 54 of file Regex.cc.

zypp::str::regex::regex ( const regex rhs)
inline

Definition at line 100 of file Regex.h.

Member Function Documentation

regex& zypp::str::regex::operator= ( const regex rhs)
inline

Definition at line 103 of file Regex.h.

std::string zypp::str::regex::asString ( ) const
inline

string representation of the regular expression

Definition at line 109 of file Regex.h.

regex_t* zypp::str::regex::get ( )
inline

Expert backdoor.

Returns pointer to the compiled regex for direct use in regexec()

Definition at line 114 of file Regex.h.

void regex::assign ( const std::string &  s,
int  flags = match_extended 
)
private

Definition at line 29 of file Regex.cc.

Friends And Related Function Documentation

friend class smatch
friend

Definition at line 121 of file Regex.h.

bool regex_match ( const char *  s,
str::smatch matches,
const regex regex 
)
friend
bool regex_match ( const char *  s,
const regex regex 
)
friend

regex ZYPP_STR_REGEX

regex ZYPP_STR_REGEX

std::ostream & operator<< ( std::ostream &  str,
const regex obj 
)
related

Stream output

Definition at line 131 of file Regex.h.

Member Data Documentation

std::string zypp::str::regex::m_str
private

Definition at line 124 of file Regex.h.

int zypp::str::regex::m_flags
private

Definition at line 125 of file Regex.h.

regex_t zypp::str::regex::m_preg
private

Definition at line 126 of file Regex.h.

bool zypp::str::regex::m_valid
private

Definition at line 127 of file Regex.h.


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