Fix the regression tests as reported on #1142

This commit is contained in:
Felipe Zimmerle
2016-05-05 11:28:58 -03:00
parent 3062ff2aa5
commit d0e0002283
3 changed files with 9 additions and 3 deletions

View File

@@ -29,8 +29,14 @@ namespace operators {
bool Rx::evaluate(Transaction *transaction, const std::string& input) {
SMatch match;
if (m_param.empty()) {
return true;
}
if (regex_search(input, &match, *m_re) && match.size() >= 1) {
transaction->m_matched.push_back(match.match);
if (transaction) {
transaction->m_matched.push_back(match.match);
}
return true;
}