29#define USE_CPP_11_REGEX 0
57 std::string d_pattern;
59 void init(
const char *s) { d_exp = std::regex(s); }
60 void init(
const std::string &s) { d_exp = std::regex(s); }
69 std::string d_pattern;
71 void init(
const char *t);
72 void init(
const std::string &s) { init(s.c_str()); d_pattern = s; }
81 explicit BESRegex(
const std::string &s) { init(s); }
89 std::string pattern()
const {
return d_pattern; }
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;
Regular expression matching.
BESRegex(const char *s)
initialize a BESRegex with a C string
int match(const char *s, int len, int pos=0) const
Does the pattern match.
BESRegex(const std::string &s)
initialize a BESRegex 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.
BESRegex(const char *s, int)