Regex Tester

dev tool

Test regular expressions against text with live match highlighting

This tool is local

Runs on your device — files are never uploaded. Close the tab and nothing exists anywhere.

More dev tools

TOOLS / Developer / Regex Tester

Regex Tester

FREELOCAL — RUNS ON YOUR DEVICE

Test regular expressions against text with live match highlighting

Regular Expression
/
/g
Flags:Global — find all matches
Text
1
2
3
4
5
6

Test and debug regular expressions against any text with live match highlighting. Supports JavaScript-flavour regex with all standard flags.

Regex flags

FlagNameEffect
gGlobalFind all matches, not just the first
iCase-insensitive"a" matches "a" and "A"
mMultiline^ and $ match start/end of each line, not whole string
sDotall. matches newline characters
uUnicodeCorrectly handles unicode characters and code points
yStickyMatch starting at lastIndex only

Common patterns cheat-sheet

\d
Any digit (0–9)
\w
Word character (letter, digit, underscore)
\s
Whitespace (space, tab, newline)
.
Any character except newline (unless s flag)
[abc]
Any of a, b, or c
*
Zero or more of the previous
+
One or more of the previous
?
Zero or one (optional)
{n,m}
Between n and m repetitions
(abc)
Capture group
^ / $
Start / end of line (or string)

Frequently asked questions

Which regex flavour does this use?

JavaScript regex (the same flavour Node.js and browsers use). Most patterns also work in other languages with small adjustments.

What flags are supported?

g, i, m, s, u, and y — the standard JavaScript flags.

Does it support lookahead/lookbehind?

Yes, including positive and negative variants: (?=...), (?!...), (?<=...), (?<!...).

Is there a text size limit?

No enforced limit. Very large inputs (>1 MB) may slow the browser.