util·tools

Regex Tester

Type a regular expression and some text, and see every match highlighted instantly — with each capture group listed and its position shown. Turn the g, i, m and s flags on or off to change how matching works. Everything runs in your browser, so nothing you paste is uploaded.

0
Matches
Highlighted text

About this regex tester

A regular expression (regex) is a compact pattern for finding text — a run of digits, an email shape, a word at the start of a line, and so on. This regex tester lets you write a pattern and immediately see what it matches in your sample text: every match is highlighted, counted, and listed with its position and any capture groups it contains. The four checkboxes map to the standard JavaScript flags — g finds all matches instead of just the first, i ignores upper and lower case, m makes ^ and $ work on each line, and s lets . match newlines. If your pattern has a syntax error, the tool explains what went wrong instead of failing silently. Matching uses your browser's own regular-expression engine and nothing you type is sent anywhere.

Frequently asked questions

What regex flavour does this use?
It uses JavaScript's built-in regular-expression engine, the same one that runs in every web browser, so patterns behave exactly as they would in JavaScript code.
What do the g, i, m and s flags do?
g finds every match rather than the first, i ignores case, m makes ^ and $ match at line breaks, and s lets the dot match newline characters.
Is my text sent to a server?
No. The pattern and text are matched entirely in your browser, so nothing you paste ever leaves your device.

Related tools