What is the JavaScript Regex Tester?
Lets you write a regular expression and try it against a block of text right in the browser, showing every match highlighted inline along with its captured groups.
How it works
Each time the pattern, flags, or test text changes, the tool compiles a native browser `RegExp` object with whatever flags you've toggled (g/i/m) and calls `exec()` in a loop to collect every match, its index, and its capture groups. Those match spans are then wrapped in `<mark>` tags over a copy of the original text so you see highlights without touching what you typed.
SysAdmin & security use cases
- Work out a pattern like an email or slug matcher against real edge cases before shipping it.
- Debug why a scraping regex is missing matches in a block of pasted HTML or log lines.
- Check exactly which capture group holds which value before wiring it into a replace() call.
- Compare how the g, i, and m flags change match count and boundaries on the same input.