Regex Tester
Test regular expressions with live pattern matching and highlighting
Highlighted Text (0 matches)
Enter a test string to see matches...
Result
Enter a replacement string to see the result...
Common Regex Patterns
\dAny digit (0-9)
\wAny word character (a-z, A-Z, 0-9, _)
\sAny whitespace character
.Any character except newline
^Start of string/line
$End of string/line
*Zero or more times
+One or more times
?Zero or one time
{n}Exactly n times
[abc]Any of a, b, or c
(abc)Capture group
Flags
gGlobal - find all matches
iCase insensitive
mMultiline - ^ and $ match line boundaries
sDot all - . matches newlines
uUnicode - treat pattern as Unicode
ySticky - match from lastIndex only