Regex Tester
Test regular expressions with live match highlighting.
Free
Runs in your browser
Highlighted matches
Matches and groups
Replace
About this tool
Regex Tester shows every match of your regular expression as you type, with a table of capture groups and a replace preview. It uses the JavaScript regex engine in your browser, so results match what your code will do.
How to use Regex Tester
- Type a pattern or pick a preset.
- Paste the text you want to search.
- Read the highlighted matches and groups, or try a replacement.
Questions people ask
Which regex flavour does this use?
JavaScript (ECMAScript). Most syntax matches PCRE, Python and Java, but lookbehind support, possessive quantifiers and some flags differ between engines.
What do the g, i, m and s flags do?
g finds all matches instead of the first, i ignores case, m makes ^ and $ match at each line, and s lets the dot match new lines.
How do I use a capture group in the replacement?
Write $1, $2 and so on for numbered groups, $<name> for named groups like (?<year>\d{4}), and $& for the whole match.
More developer tools
See all 24 →
JWT DecoderDecode JWT header and payload with readable dates.
SQL FormatterBeautify SQL queries for MySQL, PostgreSQL and more.
HTML FormatterBeautify and indent messy HTML code.
CSS FormatterBeautify minified CSS into readable rules.
JavaScript FormatterBeautify minified JavaScript with clean indents.
HTML MinifierShrink HTML by removing comments and whitespace.