Free JavaScript regex tester with groups and a replace preview
Build and check a regular expression against real sample text before it goes anywhere near production. Every match, capture group, and replacement updates as you type, so you can see exactly what a pattern does instead of guessing and shipping it.
Each match is highlighted in place, and every numbered and named capture group is listed with its exact position in the text. Group colours in the highlighted text match the colours in the result list, so it stays obvious which part of a long pattern captured which piece of text.
Type a replacement to preview the rewritten result, using $1 for a numbered group, $<name> for a named group, and $& for the whole match. That makes it quick to plan redirect rules, clean up log files, rename in bulk, or pull structured data out of messy text. Presets for email addresses, URLs, IPv4 addresses, dates, and UUIDs give you a working starting point.
A pattern that would otherwise run away is stopped automatically, so an accidental catastrophic backtrack never locks up the page. Nothing you type is uploaded or stored, which means you can safely test against real log lines, exports, and customer records.