Test regular expressions and inspect matches and capture groups, with common flag support.
No comments yet. Be the first!
Enter a regular expression and test text to inspect matches, capture groups and named groups, with g/i/m/s/u/y flags. Evaluation runs in a background thread with a timeout so a heavy pattern will not freeze the page.
Certain regular expressions (especially nested repetition, like (a+)+b) can trigger "catastrophic backtracking" on specific input, causing runtime to explode. Every test here runs in an isolated background thread (a Web Worker) with a timeout — exceeding it terminates that thread immediately and a brand-new one is created for your next test, so the page itself never freezes.
No. Matched text is always rendered through plain React text nodes — this tool never uses dangerouslySetInnerHTML, so whatever is matched can never be executed as HTML.
This faithfully reflects real JavaScript RegExp behavior: without the global ("g") flag, .exec() only ever returns the first match — adding "g" is what lists every match, which is exactly why this tool lets you toggle it.
Every test runs in an isolated background thread (a Web Worker) with a timeout — untrusted regular expressions are never executed directly on the main UI thread.