Skip to content

Regex Tester

Test a regular expression against sample text with live highlighting and capture groups.

regex.exe

Highlighted

Contact us at hello@example.com or support@easyapplibrary.com

2 matches

#1 at index 14: hello@example.com

Groups: [1] hello [2] example.com

#2 at index 35: support@easyapplibrary.com

Groups: [1] support [2] easyapplibrary.com

How to use Regex Tester

  1. 01Enter your pattern and choose the flags you need — g for all matches, i to ignore case, m for multiline.
  2. 02Paste the text you want to test against.
  3. 03Matches are highlighted as you type, with each match and its capture groups listed below.

About Regex Tester

This tester runs the JavaScript regular expression engine, so what you see here is exactly what your code will do in a browser or in Node. Flags, lazy quantifiers, lookahead and named groups all behave identically.

Two habits prevent most regex pain: prefer specific character classes over the dot, and anchor your pattern when you mean the whole string. Nested quantifiers such as (a+)+ can backtrack catastrophically on long inputs, so keep them out of anything that touches user input.

Frequently asked questions

Which regex dialect is this?
JavaScript's, so results match what your front-end or Node code will produce.
Why does my pattern only find one match?
Add the g flag. Without it the engine stops after the first match.
Are capture groups shown?
Yes, every match lists its index and each numbered capture group.

Related tools and tools