Regex Lab
A live regular-expression workbench: type a pattern, toggle flags, and watch the matches and capture groups light up in your test string.
A regex is quicker to write than to verify, and the usual loop — edit the pattern, re-run the code, read a console dump — is slow. Here the matches are highlighted in the text as you type, every capture group (numbered and named) is broken out per match, and a bad pattern shows its error instead of throwing. The six flags are toggle chips with a note on what each one does.
A replacement pane applies `$1` and `$<name>` back-references and shows the substituted result, a library of real patterns — email, URL, IPv4, ISO date, semantic version, duplicate word — seeds it with a working sample, and a token cheatsheet sits underneath for the piece you half-remember. It runs on your machine; the pattern and the text you test never leave the page.
What people open it for
- Checking what a pattern actually matches before putting it in code
- Reading out named and numbered capture groups per match
- Previewing a find-and-replace with back-references
- Starting from a known-good pattern instead of from scratch