| 2258 | } |
| 2259 | } |
| 2260 | bool jjRegexSearch(const String& text, const String& expression, bool ignoreCase) { |
| 2261 | noop(); |
| 2262 | |
| 2263 | try { |
| 2264 | auto flags = std::regex_constants::ECMAScript; |
| 2265 | if (ignoreCase) { |
| 2266 | flags |= std::regex_constants::icase; |
| 2267 | } |
| 2268 | std::regex r(expression.begin(), expression.end(), flags); |
| 2269 | return std::regex_search(text.begin(), text.end(), r); |
| 2270 | } catch (std::regex_error& e) { |
| 2271 | LOGE("Failed to process regular expression: {}", e.what()); |
| 2272 | return false; |
| 2273 | } |
| 2274 | } |
| 2275 | bool jjRegexSearchWithResults(const String& text, const String& expression, CScriptArray& results, bool ignoreCase) { |
| 2276 | noop(); |
| 2277 | |