Loading…

Skip to content

Regex Tester

Test regular expressions live with match highlighting and capture groups.

How to test a regex

Enter a pattern and flags, then type or paste your test string. Matches are highlighted and listed with their index and capture groups.

Flavour

This uses JavaScript regular expressions. Most syntax carries over to other languages, but features like lookbehind or named groups can differ.

Frequently asked questions

What do the flags mean?

g = all matches, i = ignore case, m = ^ and $ match per line, s = dot matches newlines, u = Unicode, y = sticky.

Why does my regex hang?

Nested quantifiers like (a+)+ can backtrack catastrophically on some inputs. Simplify the pattern.

Related tools