Every match is marked in your text as you type, with its position, line and column listed underneath. Neighbouring matches alternate colors so you can tell where one ends.
Developer
Regex Tester
Write a regular expression, paste some text, and see every match highlighted with its position and capture groups. Try a replacement and copy the pattern as code.
Enter a pattern and the matches appear here, highlighted in your text.
See exactly what your pattern does.
A regular expression is easy to get almost right. Seeing each match, and each group inside it, shows where a pattern is too greedy or too strict.
Capture groups and named groups are listed for each match. Turn on replace to preview the result with $1, $<name> and $& before you use it in code.
Matching runs in the background and is stopped after a moment, so a pattern with catastrophic backtracking gives you a warning instead of freezing the tab.
Frequently asked questions
Which regex flavor does this use?
JavaScript's, the same engine your browser and Node.js use. Most syntax is shared with other languages, but a few things differ: named groups are written (?<name>...) rather than (?P<name>...), and there are no possessive quantifiers or atomic groups.
What do the flags do?
Global finds every match instead of just the first. Ignore case treats upper and lower case as equal. Multiline makes ^ and $ match at each line. Dot matches newline lets . cross line breaks. Unicode turns on full Unicode handling, including \u{1F600} escapes.
Why does it say my pattern is taking too long?
Some patterns, such as (a+)+$ on a long run of a's, make the engine try an exponential number of paths. That is called catastrophic backtracking. Make the pattern more specific, or avoid repeating a group that can already match the same text in several ways.
How do I use a group in the replacement?
Write $1, $2 and so on for numbered groups, $<name> for a named group, and $& for the whole match. Use $$ for a literal dollar sign.
