Regex Tester

g: global | i: ignore case | m: multiline | s: dotAll | u: Unicode | y: sticky

Matches:0
Preview...

Regex Symbol Reference

SymbolDescriptionExample
.Matches any single character (except newline)a.c matches abc, adc
*Matches 0 or more of the preceding characterab*c matches ac, abc, abbc
+Matches 1 or more of the preceding characterab+c matches abc, abbc
?Matches 0 or 1 of the preceding characterab?c matches ac, abc
^Matches the start of the string^abc matches strings starting with abc
$Matches the end of the stringabc$ matches strings ending with abc
\dMatches any digit [0-9]\d+ matches 123, 456
\wMatches word characters (letters, digits, underscore)\w+ matches abc, 123, _test
\sMatches whitespace characters (space, tab, etc.)a\sb matches 'a b'
[abc]Matches any one character in brackets[abc] matches a, b, c
[^abc]Matches any character except those in brackets[^abc] matches d, e, f
[a-z]Matches any character in the specified range[a-z] matches lowercase letters
{n}Matches exactly n occurrences of the preceding charactera{3} matches aaa
{n,}Matches n or more occurrences of the preceding charactera{2,} matches aa, aaa
{n,m}Matches between n and m occurrences of the preceding charactera{2,4} matches aa, aaa, aaaa
|OR operator, matches either left or right expressioncat|dog matches cat or dog
()Grouping, used to capture matched substrings(ab)+ matches ab, abab
\Escape character, used to match special characters literally\. matches a literal dot