Regex Tester & Explainer

Test, analyze, and validate regular expressions with live match highlighting. Fast, free, and fully client-side.

No matches found.

How the Regex Tester & Explainer Works

Runs a regular expression against sample text. You enter the pattern and a flags field, which starts with g, and the tool lists each match with its position and any capture groups. An invalid pattern shows the parser error instead of results. Runs in your browser and the text is never uploaded.

Usage Example

Checks whether a ZIP code pattern matches every row of a CSV export before it goes into a validation rule.

Frequently Asked Questions

What does the g flag change?

With g present, the tool loops through the input and lists every match. The flags field starts with g, so all occurrences appear until you remove it. Flags are passed to the JavaScript RegExp constructor as entered.

What appears when the pattern is invalid?

The error message from the regular expression parser is shown in place of match results. An unbalanced parenthesis or an unsupported flag is typical of what triggers it. Fix the pattern to see matches again.

What information is shown for each match?

Each match shows its index in the input and the text captured by any groups in the pattern. A pattern without groups shows only the index and the matched text.

Browse more

See all developer reference guides and interactive utilities.