Go to the documentation of this file.
12 #ifndef ZYPP_BASE_REGEX_H
13 #define ZYPP_BASE_REGEX_H
74 bool regex_match(
const char * s,
const regex & regex );
86 std::string
regex_substitute (
const std::string & s,
const regex & regex,
const std::string &replacement,
bool global =
true );
115 {
assign(rhs.m_str, rhs.m_flags); }
127 bool matches (
const char * s )
const;
167 unsigned size()
const;
186 #endif // ZYPP_BASE_STRING_H
bool matches(const char *s, str::smatch &matches, int flags=none) const
regex & operator=(const regex &rhs)
std::string regex_substitute(const std::string &s, const regex ®ex, const std::string &replacement, bool global=true)
Replaces the matched regex with the string passed in replacement.
Base class for Exception.
void assign(const std::string &s, int flags=match_extended)
std::string asString() const
string representation of the regular expression
std::string operator[](unsigned i) const
std::string::size_type begin(unsigned i) const
Begin index of subexpression i in match_str (or std::string::npos)
@ icase
Do not differentiate case.
@ not_bol
Do not match begin of line.
@ nosubs
Support for substring addressing of matches is not required.
std::ostream & operator<<(std::ostream &str, const regex &obj)
std::string::size_type end(unsigned i) const
End index of subexpression i in match_str (or std::string::npos)
Easy-to use interface to the ZYPP dependency resolver.
Regular expression match result.
std::vector< regmatch_t > pmatch
@ match_extended
Use POSIX Extended Regular Expression syntax when interpreting regex.
bool regex_match(const std::string &s, smatch &matches, const regex ®ex)
\relates regex \ingroup ZYPP_STR_REGEX \relates regex \ingroup ZYPP_STR_REGEX
String related utilities and Regular expression matching.
regex_t * get()
Expert backdoor.
bool regex_match(const char *s, smatch &matches, const regex ®ex)
Regular expression matching.