22 |
|
{ |
23 |
|
private: |
24 |
|
::pcre* expression; |
25 |
+ |
int options; |
26 |
|
std::vector<std::string> substrings; |
27 |
|
public: |
28 |
< |
Matcher() : expression(NULL) {} |
29 |
< |
Matcher(const std::string& expression) : expression(NULL) { (*this)(expression); } |
28 |
> |
static int defaults; |
29 |
> |
Matcher(int options = defaults) : expression(NULL), options(options) {} |
30 |
> |
Matcher(const std::string& expression, int options = defaults) : expression(NULL), options(options) { (*this)(expression); } |
31 |
|
~Matcher() { if (expression != NULL) ::pcre_free(expression); } |
32 |
|
bool match(const std::string& stuff); |
33 |
|
std::vector<std::string>::size_type size() const { return substrings.size(); } |