Free Online Tools / Developer Tools

Regex Tester

Test a regular expression with highlighted matches and groups.

Highlighted matches

Matches will be highlighted here.

Cheatsheet

PatternMeaning
.Any character except newline
\d \w \sDigit, word character, whitespace
\D \W \SNot a digit, word character, whitespace
[abc] [^abc] [a-z]Character class, negated class, range
^ $ \bStart, end, word boundary
* + ? {n} {n,m}Zero or more, one or more, optional, exact, range
( ) (?: ) (?<name> )Capturing group, non-capturing group, named group
|Alternation (or)
(?= ) (?! )Positive / negative lookahead

Runs entirely in your browser. Nothing you paste or upload leaves your device.