Regular Expression Tester

Test, debug, and visualize your regular expressions with real-time pattern matching.

e.g. /pattern/flags
/ /

Match Results

Enter a regex pattern above to see matches.

Common Regex Patterns

Regex Quick Reference

Pattern Description Example
[abc] Single character (a, b, or c) "abc" matches "a" in "abc"
[^abc] Single character not in set "[^a]" matches "b" in "abc"
[a-z] Character range "[a-z]" matches any lowercase letter
\\d Any digit (0-9) "\\d" matches "5" in "a5c"
\\w Word character (letter, digit, underscore) "\\w" matches "a" in "a!c"
\\s Whitespace character "\\s" matches " " in "a c"
^ Start of line "^a" matches "a" at the start of a line
$ End of line "a$" matches "a" at the end of a line
* 0 or more occurrences "a*" matches "", "a", "aa", etc.
+ 1 or more occurrences "a+" matches "a", "aa", etc. (not "")