Regex Tester

Enter a pattern and flags, paste in some text, and every match updates as you type.

How it works

The pattern runs as a standard JavaScript regular expression (new RegExp(pattern, flags)), with the g flag always added internally so every match in the text is found, not just the first. Each match shows its full text, its character position, and any captured groups. An invalid pattern — an unbalanced parenthesis, for example — shows a clear error instead of a result.

A pathological pattern (catastrophic backtracking) can be slow to match. That only affects your own browser tab while it runs — nothing is sent to a server — so no special protection against it is implemented here.