Home › Testers › Regular Expression Tester

Regular Expression Tester

Write a pattern, add flags, and test it against a sample string. Every match is listed with its index and capture groups, and highlighted in the text itself.

Regular Expression Tester

How to use the Regular Expression Tester

  1. Type your pattern in the Pattern box (without slashes).
  2. Add flags if you need them: g for all matches, i for case-insensitive, m for multiline.
  3. Paste the text to test against in the Test string box.
  4. Press Test — matches are listed with their positions and groups, and highlighted in the text.

About this tool

Regular expressions are write-only code for most of us: they work, or they silently match the wrong thing. This tester uses the JavaScript regex engine — the same one your browser code runs — and shows not just whether the pattern matched, but every match, where it starts, and what each capture group caught. An invalid pattern produces the engine's own error message so you can fix the exact problem.