diff --git a/src/operators/rx.cc b/src/operators/rx.cc index ff84d95d..8be06a39 100644 --- a/src/operators/rx.cc +++ b/src/operators/rx.cc @@ -33,19 +33,12 @@ bool Rx::evaluate(Transaction *transaction, Rule *rule, const std::string& input, std::shared_ptr ruleMessage) { SMatch match; std::list matches; - Regex * re = m_re; if (m_param.empty()) { return true; } - std::string eparam = MacroExpansion::expand(m_param, transaction); - - if (eparam != m_param) { - re = new Regex(eparam); - } - - matches = re->searchAll(input); + matches = m_re->searchAll(input); if (rule && rule->getActionsByName("capture").size() > 0 && transaction) { int i = 0; matches.reverse(); @@ -65,10 +58,6 @@ bool Rx::evaluate(Transaction *transaction, Rule *rule, logOffset(ruleMessage, i.m_offset, i.m_length); } - if (re != m_re) { - delete re; - } - if (matches.size() > 0) { return true; }