🔍 Regex Tester

Test and debug regular expressions

Free Instant results No data stored

Regex Tester

Build, test, and debug regular expressions live in your browser — with match highlighting and capture groups.

Live Client-side Highlighting
Match preview
Character classes
.Any character except newline
\dDigit [0–9]
\DNon-digit
\wWord [a-zA-Z0-9_]
\WNon-word
\sWhitespace
\SNon-whitespace
[abc]Character set
[^abc]Negated set
[a-z]Range
Quantifiers
*0 or more (greedy)
+1 or more (greedy)
?0 or 1 (optional)
{n}Exactly n times
{n,m}Between n and m
+?1 or more (lazy)
*?0 or more (lazy)
Anchors & boundaries
^Start of string/line
$End of string/line
\bWord boundary
\BNon-word boundary
Groups
(abc)Capture group
(?:abc)Non-capturing group
(?=abc)Positive lookahead
(?!abc)Negative lookahead
(?<=abc)Positive lookbehind
(?<!abc)Negative lookbehind
a|bAlternation (a or b)
\1Backreference to group 1
Escapes
\nNewline
\tTab
\rCarriage return
\\Literal backslash
Flags (click to toggle)
gGlobal — all matches
iCase insensitive
mMultiline (^/$)
sDot matches newline
uUnicode mode