20 using namespace zypp::str;
23 : m_flags(match_extended)
36 static const int normal = 1<<16;
37 if (!(flags & normal)) {
42 if ((err = regcomp(&
m_preg, str.c_str(), flags))) {
44 regerror(err, &
m_preg, errbuff,
sizeof(errbuff));
70 return s && !regexec(®ex.
m_preg, s, 0, NULL, 0);
97 unsigned matches = unsigned(-1);
101 for (
unsigned i = 0; i <
sizeof(
pmatch)/
sizeof(*
pmatch); ++i )
103 if (
pmatch[i].rm_so != -1 )
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
std::string::size_type begin(unsigned i) const
Begin index of subexpression i in match_str (or std::string::npos)
std::string operator[](unsigned i) const
Regular expression match result.
Use POSIX Extended Regular Expression syntax when interpreting regex.
void assign(const std::string &s, int flags=match_extended)
bool regex_match(const std::string &s, smatch &matches, const regex ®ex)
regex ZYPP_STR_REGEX regex ZYPP_STR_REGEX
std::string::size_type end(unsigned i) const
End index of subexpression i in match_str (or std::string::npos)