| 2225 | } |
| 2226 | } |
| 2227 | bool jjRegexMatch(const String& text, const String& expression, bool ignoreCase) { |
| 2228 | noop(); |
| 2229 | |
| 2230 | try { |
| 2231 | auto flags = std::regex_constants::ECMAScript; |
| 2232 | if (ignoreCase) { |
| 2233 | flags |= std::regex_constants::icase; |
| 2234 | } |
| 2235 | std::regex r(expression.begin(), expression.end(), flags); |
| 2236 | return std::regex_match(text.begin(), text.end(), r); |
| 2237 | } catch (std::regex_error& e) { |
| 2238 | LOGE("Failed to process regular expression: {}", e.what()); |
| 2239 | return false; |
| 2240 | } |
| 2241 | } |
| 2242 | bool jjRegexMatchWithResults(const String& text, const String& expression, CScriptArray& results, bool ignoreCase) { |
| 2243 | noop(); |
| 2244 | |