Regular expression.
More...
#include <Regex.h>
List of all members.
Public Types |
enum | RegFlags {
optimize = 0,
match_extra = 0,
icase = REG_ICASE,
nosubs = REG_NOSUB,
match_extended = REG_EXTENDED,
normal = 1<<16
} |
Public Member Functions |
| regex () |
| regex (const std::string &s, int flags=match_extended) |
| ~regex () throw () |
| regex (const regex &rhs) |
regex & | operator= (const regex &rhs) |
std::string | asString () const |
| string representation of the regular expression
|
regex_t * | get () |
| Expert backdoor.
|
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 ®ex) |
bool | regex_match (const char *s, const regex ®ex) |
Related Functions |
(Note that these are not member functions.)
|
bool | regex_match (const char *s, smatch &matches, const regex ®ex) |
| Regular expression matching.
|
bool | regex_match (const std::string &s, smatch &matches, const regex ®ex) |
bool | regex_match (const char *s, const regex ®ex) |
bool | regex_match (const std::string &s, const regex ®ex) |
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:
optimize |
- Deprecated:
- legacy, obsolete
|
match_extra |
- Deprecated:
- legacy, obsolete
|
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.
|
normal |
- Deprecated:
- legacy, use match_extended
|
Definition at line 90 of file Regex.h.
Constructor & Destructor Documentation
regex::regex |
( |
const std::string & |
s, |
|
|
int |
flags = match_extended |
|
) |
| |
regex::~regex |
( |
| ) |
throw () |
zypp::str::regex::regex |
( |
const regex & |
rhs | ) |
[inline] |
Member Function Documentation
regex& zypp::str::regex::operator= |
( |
const regex & |
rhs | ) |
[inline] |
std::string zypp::str::regex::asString |
( |
| ) |
const [inline] |
string representation of the regular expression
Definition at line 112 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 117 of file Regex.h.
void regex::assign |
( |
const std::string & |
s, |
|
|
int |
flags = match_extended |
|
) |
| [private] |
Friends And Related Function Documentation
bool regex_match |
( |
const char * |
s, |
|
|
str::smatch & |
matches, |
|
|
const regex & |
regex |
|
) |
| [friend] |
bool regex_match |
( |
const char * |
s, |
|
|
const regex & |
regex |
|
) |
| [friend] |
std::ostream & operator<< |
( |
std::ostream & |
str, |
|
|
const regex & |
obj |
|
) |
| [related] |
Stream output
Definition at line 134 of file Regex.h.
Member Data Documentation
The documentation for this class was generated from the following files: