Regex Tester

Test a regular expression against sample text and see every match with its position, capture groups, and named groups highlighted inline in place.

A regex tester runs a pattern against text and shows every match with its index, capture groups, and named groups. It uses the browser RegExp engine, so the results match what your own code will do.

Result

Enter a pattern and some text.

Matches

Questions about regex tester

Which regex flavour do I get?
The JavaScript flavour, since that is what browsers run. Lookahead and lookbehind work, named groups use the question mark and angle bracket syntax.
Why do I need the global flag for every match?
Without it the engine stops after the first match. The g flag reports all of them.
How do I escape a slash in my pattern?
Use a backslash before it, for example a slash followed by a forward slash. Writing a forward slash alone also works here because the pattern field has no delimiters.