Regex Tester
Build and test regular expressions in real-time with visual highlights
Regular Expression
Enter your pattern and select flags
//
Regex Reference
Test String
Input text to match against the pattern
Matches (2)
LIVE HIGHLIGHTINGPro Tip
Collapse this bar to maximize your workspace for tools like API Flow and Animations.
Build and test regular expressions in real-time with visual highlights
Character Classes
. - Any character except newline
\d - Digit [0-9]
\D - Non-digit
\w - Word char [a-zA-Z0-9_]
\W - Non-word char
\s - Whitespace [ \t\r\n\f]
\S - Non-whitespace
Anchors
^ - Start of string/line
$ - End of string/line
\b - Word boundary
\B - Non-word boundary
Quantifiers
* - 0 or more
+ - 1 or more
? - 0 or 1
{3} - Exactly 3
{3,} - 3 or more
{3,5} - 3 to 5
Groups & Ranges
[abc] - Any character in set
[^abc] - Any character NOT in set
(...) - Capture group
(?:...) - Non-capture group
a|b - Alternation (OR)
Matches (2)
LIVE HIGHLIGHTING