29#define USE_CPP_11_REGEX 0
59 void init(
const char *s) { d_exp = std::regex(s); }
60 void init(
const std::string &s) { d_exp = std::regex(s); }
70 void init(
const char *t);
71 void init(
const std::string &s) { init(s.c_str()); }
76 explicit Regex(
const char *s) { init(s); }
78 Regex(
const char *s,
int) { init(s); }
80 explicit Regex(
const std::string &s) { init(s); }
89 int match(
const char *s,
int len,
int pos = 0)
const;
91 int match(
const std::string &s)
const;
94 int search(
const char *s,
int len,
int &matchlen,
int pos = 0)
const;
96 int search(
const std::string &s,
int &matchlen)
const;
105 -
void init(
const char *s) { d_exp = std::regex(s); }
106 -
void init(
const std::string &s) { d_exp = std::regex(s); }
114 +
void init(
const char *t);
118 -
explicit Regex(
const char *s) { init(s); }
120 -
Regex(
const char *s,
int) { init(s); }
122 -
explicit Regex(
const std::string &s) { init(s); }
127 -
int match(
const char *s,
int len,
int pos = 0)
const;
129 -
int match(
const std::string &s)
const;
132 -
int search(
const char *s,
int len,
int &matchlen,
int pos = 0)
const ;
134 -
int search(
const std::string &s,
int &matchlen)
const;
135 +
Regex(
const char *t);
136 +
Regex(
const char *t,
int dummy);
140 +
int match(
const char* s,
int len,
int pos = 0);
142 +
int search(
const char* s,
int len,
int& matchlen,
int pos = 0);
Regex(const char *s)
initialize a Regex with a C string
Regex(const std::string &s)
nitialize a Regex with a C++ string
int search(const char *s, int len, int &matchlen, int pos=0) const
How much of the string does the pattern match.
Regex(const char *s, int)
int match(const char *s, int len, int pos=0) const
Does the pattern match.
top level DAP object to house generic methods