Regex Tester

Write a regular expression and see every match light up in your text as you type. Capture groups, named groups and replacements are shown too. Uses the JavaScript regex engine.

//
Test string
Matches
Replace

Questions

Which regex flavour is this?

JavaScript (ECMAScript), the same engine your browser and Node.js use. It supports lookbehind, named groups (?<name>…) and Unicode property escapes like \p{L} with the u flag. Most patterns behave the same in Java, Python and PCRE, but check advanced features.

What do the flags do?

g finds every match instead of the first. i ignores case. m makes ^ and $ match at each line. s lets . match newlines. u turns on full Unicode. y only matches at the current position.

How do I use groups in the replacement?

Use $1, $2 and so on for numbered groups, $<name> for named groups, and $& for the whole match.