Regex Tester

Test regular expressions in real time

/ /
Test String
Quick Reference
.Any character
\dDigit [0-9]
\DNon-digit
\wWord char [A-Za-z0-9_]
\WNon-word char
\sWhitespace
\SNon-whitespace
^Start of string/line
$End of string/line
\bWord boundary
*0 or more
+1 or more
?0 or 1
{n}Exactly n times
{n,m}n to m times
[abc]Character class
[^abc]Negated class
()Capture group
(?:)Non-capture group
(?=)Positive lookahead
(?!)Negative lookahead
(?<=)Positive lookbehind
(?<!)Negative lookbehind
|Alternation (OR)

How to Use

1
Enter regex

Enter the regular expression to test.

2
Enter test string

Enter the text to match against.

3
View results

Matches are highlighted and group info is displayed.

FAQ

What flags are supported?

g (global), i (case insensitive), m (multiline), s (dotAll), and u (unicode) flags.

Are capture groups shown?

Yes, capture groups and index information are shown for each match.

Are files uploaded to a server?

No. All processing happens in your browser.