| 81 | } |
| 82 | |
| 83 | int |
| 84 | match(const regexHelper &re, const std::string &s) const |
| 85 | { |
| 86 | // For last capture to work safely, this has to make a copy of the subject string |
| 87 | // so the matches results will point into that and avoid any lifetime issues with |
| 88 | // the passed in `s` |
| 89 | _extended_info.subject_storage = s; |
| 90 | return re.regexMatch(_extended_info.subject_storage, _extended_info.matches); |
| 91 | } |
| 92 | |
| 93 | const RegexMatches & |
| 94 | matches() const |