Regular Expression Tester
Shows every match of a pattern with its line, position and capture groups.
Loading the tool…
How to use this tool
- Put the text you want to search in the first box.
- Put the regular expression in the second box, without the surrounding slashes.
- Turn on ignore case or multiline if your pattern needs them.
- Select Test, and read the group columns to see which part of the pattern caught what.
What regex tester does
Put your text in the first box and the pattern in the second. Every match comes back with the line it is on, its position in the text and the contents of each capture group, numbered and named, so you can see which part of the pattern caught which part of the text rather than guessing from the whole match.
Two things are called out because they are the usual causes of a pattern that seems not to work. Empty matches are flagged, since a pattern that can match nothing will match everywhere and is nearly always missing a quantifier. And the flags are shown in the summary, because case sensitivity and whether ^ means start of line or start of text change the answer completely.