Regex Tester

Write a pattern, paste your text — matches highlight instantly inline.

//g
Flags:
Test String
0 chars · 1 lines

🐼

Match details appear here

Write a pattern and paste your test string

Cheat Sheet — click a token to append

.Any char (except newline)
\dDigit [0-9]
\DNon-digit
\wWord char [a-zA-Z0-9_]
\WNon-word char
\sWhitespace
\SNon-whitespace
\bWord boundary
^Start of string/line
$End of string/line
*0 or more
+1 or more
?0 or 1 (optional)
*?Lazy 0 or more
+?Lazy 1 or more
{n,m}n to m times
[abc]Char class
[^abc]Negated class
(a|b)a or b
(?:...)Non-capturing group
(?=...)Lookahead
(?!...)Negative lookahead
(?<=...)Lookbehind
(?<!...)Neg. lookbehind
(?<name>...)Named group
\1Backreference #1
$1Replace: group #1
$&Replace: whole match