Regex Tester

Test regular expressions against text, inspect matches, and experiment with regex flags in real time.

Regular expression

/
/g

Flags

Quick examples

JavaScript RegExpPattern length: 46/500•Flags: g

Test string

169 / 10,000 characters

Match results

2 matches

Highlighted text

Contact us at support@example.com or sales@company.org.

Useful links:
https://example.com
https://docs.example.com/guide

Phone: +1-555-123-4567
Order ID: ORD-2026-1042

Highlighting shows non-overlapping matches. See the results below for exact match positions and capture groups.

Matches and capture groups

Match 1Index 14–33
"support@example.com"

Start index: 14 · End index: 33

No capture groups in this pattern.

Match 2Index 37–54
"sales@company.org"

Start index: 37 · End index: 54

No capture groups in this pattern.

Regex quick reference

.Any character except newline by default
\dA digit
\wA word character
\sWhitespace
+One or more occurrences
*Zero or more occurrences
?Zero or one occurrence
^Start of input or line with m
$End of input or line with m
[abc]Any one of the listed characters
(abc)Capture a matching group
(?:abc)Non-capturing group

Privacy and performance

Matching runs in your browser; this page does not send the test text to a server. Very complex regular expressions can take a long time to evaluate, so use patterns you trust and keep test inputs reasonably small.

Built for developers · Test JavaScript regular expressions instantly