Regex Tester

Test regular expressions against text with live match highlighting.

Runs locally in your browser
Matches No signup · local processing

Enter a pattern and test string to see matches

Type a regular expression and some test text on the left. Every match is highlighted as you type and listed with its position and capture groups — all in your browser.

Runs entirely in your browser

Test regular expressions live, locally

Type a regular expression and some test text, and this tool highlights every match as you type. Toggle the standard JavaScript flags — global, ignore case, multiline, dotall, unicode, and sticky — and see the effect instantly. Each match is listed with its position and any capture groups, including named groups. An optional replacement field shows a live preview using $1, $, and the usual replacement syntax. Everything runs in your browser with the native RegExp engine, so your patterns and text are never uploaded anywhere.

Common questions

Which regex flavor does this use?

It uses the browser's native JavaScript RegExp engine, so the syntax and behavior match exactly what you would get in JavaScript — including lookahead, lookbehind, named groups, and Unicode property escapes where your browser supports them.

What do the flags do?

g matches all occurrences, i ignores case, m makes ^ and $ match line boundaries, s lets . match newlines, u enables full Unicode mode, and y (sticky) anchors each match to the last index. Toggle them and the matches update live.

How does the replace preview work?

Enter a replacement string and the tool shows the result of text.replace(regex, replacement). You can use $1, $2 for numbered groups, $<name> for named groups, and $& for the whole match, just like in JavaScript.

What happens if my regex is invalid?

The tool catches the error and shows the exact message from the RegExp constructor, so you can fix the pattern. Nothing breaks and no partial matches are shown for an invalid pattern.

Is my pattern or text uploaded?

No. Matching runs entirely in your browser with the built-in RegExp engine. Nothing is sent to a server, so it works offline and keeps your data private.