Test whether a regular expression matches any part of a sample string and report match success without executing unsafe code.
Behavior
Provide a pattern, optional flags (i, m, s, u), and subject text. The engine compiles the pattern in a try/catch boundary — invalid syntax returns a clear error instead of throwing to the console. A boolean-style result indicates whether at least one match exists.
When to use it
Iterate on regex during log parsing, validate user-supplied patterns before saving to a database, or teach how flags alter case sensitivity and multiline matching.
Limitations
Reports presence only, not capture groups or match positions (use the extract-matches tool for enumerations). Catastrophic backtracking on pathological patterns can still freeze the tab — test complex expressions on small inputs first. JavaScript regex flavor differs subtly from PCRE or .NET.