🔎Regex Tester

Test regular expressions live — highlight matches, inspect capture groups, and preview replacements.

/ /
Flags
Test String
Highlighted Matches
Matches will be highlighted here…
Characters
.Any character except newline
\dDigit [0–9]
\DNon-digit
\wWord char [a-zA-Z0-9_]
\WNon-word char
\sWhitespace (space, tab, newline)
\SNon-whitespace
\nNewline
\tTab
Anchors
^Start of string (or line with m)
$End of string (or line with m)
\bWord boundary
\BNon-word boundary
Quantifiers
*0 or more (greedy)
+1 or more (greedy)
?0 or 1 (optional)
{n}Exactly n times
{n,m}Between n and m times
*?0 or more (lazy)
+?1 or more (lazy)
Groups & Sets
[abc]Any of a, b, or c
[^abc]Not a, b, or c
[a-z]Any char a through z
(abc)Capture group
(?<n>…)Named capture group
(?:…)Non-capturing group
a|bAlternation: a or b
Lookaround
(?=…)Lookahead (match if followed by)
(?!…)Negative lookahead
(?<=…)Lookbehind
(?<!…)Negative lookbehind
Replace references
$1 $2Numbered capture group
$<n>Named capture group
$&Entire match
$$Literal $

Regex tester online — test regular expressions in your browser

Debugging a regular expression? Our free regex tester shows you exactly what your pattern matches, live. Type your regex and a test string, and every match is highlighted instantly — no running, no guessing. Toggle flags like global, case-insensitive, and multiline, and watch the results update in real time.

It goes beyond highlighting. A match list breaks down each result with its position, the full match, and every capture group — including named groups — so you can see precisely what your pattern is capturing. Invalid patterns get a clear error message instead of a cryptic failure, and a built-in cheat sheet of common tokens is there when you need a reminder. You can also test replacements to preview the output with $1 and $<name> references.

Whether you're writing validation, parsing text, or learning regex, this online regex tester makes the whole process visible. Simply enter a pattern and some text to test it instantly. No sign-up, no downloads, no limits — your patterns and test data stay in your browser, privately.