Regex Tester
Run a JavaScript regular expression against test text: every match with its position, and numbered or named capture groups as columns.
Fill in the values and calculate
The form sends itself back to this page — results print below, computed on the server.
No results yet: fill the form above and press Calculate.
About Regex Tester
The pattern is compiled by the JavaScript RegExp engine the browser uses, so the syntax, flags, and behaviour you see here match what the same expression does in JavaScript code.
Every match is listed with its position and length, plus one column per capture group: numbered groups as $1, $2 and named groups written (?<name>...) under their own name. The first match's value for each group is also shown as a card.
Questions about Regex Tester
Do I type the slashes around the pattern?
No. Write only the body; the page builds new RegExp(pattern, flags) around it for you.
Why does the scan skip the rest of a match?
Scanning is left to right and non-overlapping, the way every regex engine advances after a match.
What if the pattern is invalid?
It says so instead of pretending to match: the compile error from the RegExp engine is shown in full.
Bookmark and homescreen
- Press Ctrl+B now (or Cmd+B on macOS) to bookmark this page in your browser.
- Drag this link to your bookmarks bar and it will always open this tool: Regex Tester.
- On a phone: open in Chrome/Safari and use "Add to Home Screen" — the site ships a homescreen icon and manifest, so it installs like an app.
- Two addresses work:
https://useful-utilities.com/regex-tester/andregex-tester.useful-utilities.com. Copy whichever you prefer.