29 #define USE_CPP_11_REGEX 0
62 void init(
const char *s) { d_exp = std::regex(s); }
63 void init(
const std::string &s) { d_exp = std::regex(s); }
73 void init(
const char *t);
74 void init(
const std::string &s) { init(s.c_str()); }
79 explicit Regex(
const char *s) { init(s); }
81 Regex(
const char *s,
int) { init(s); }
83 explicit Regex(
const std::string &s) { init(s); }
92 int match(
const char *s,
int len,
int pos = 0)
const;
94 int match(
const std::string &s)
const;
97 int search(
const char *s,
int len,
int &matchlen,
int pos = 0)
const ;
99 int search(
const std::string &s,
int &matchlen)
const;
108 -
void init(
const char *s) { d_exp = std::regex(s); }
109 -
void init(
const std::string &s) { d_exp = std::regex(s); }
117 +
void init(
const char *t);
121 -
explicit Regex(
const char *s) { init(s); }
123 -
Regex(
const char *s,
int) { init(s); }
125 -
explicit Regex(
const std::string &s) { init(s); }
127 - ~
Regex() =
default;
130 -
int match(
const char *s,
int len,
int pos = 0)
const;
132 -
int match(
const std::string &s)
const;
135 -
int search(
const char *s,
int len,
int &matchlen,
int pos = 0)
const ;
137 -
int search(
const std::string &s,
int &matchlen)
const;
138 +
Regex(
const char *t);
139 +
Regex(
const char *t,
int dummy);
143 +
int match(
const char* s,
int len,
int pos = 0);
145 +
int search(
const char* s,
int len,
int& matchlen,
int pos = 0);
Regular expression matching.
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