Regex Tester

Test regular expressions interactively on sample text.

/ /
0 match(es)
Regex 101: Test numbers like 42 or 2024 easily!

Cheat Sheet

CharacterDescriptionExample
.Any character except newlinea.c matches "abc"
\wWord character (alphanumeric)\w+ matches "Word123"
\dDigit (0-9)\d{3} matches "123"
\sWhitespace (space, tab, newline)\s+ matches spaces
[abc]Any of a, b, or c[a-z] matches any lowercase letter
[^abc]Not a, b, or c[^0-9] matches any non-digit
^ / $Start / End of string^Hello / World$
* / +0 or more / 1 or morea* / b+
?0 or 1 (optional)colou?r matches "color" or "colour"
{n,m}Between n and m times\d{2,4} matches 2 to 4 digits