Text

Regex Tester

Write a regex pattern and test it against sample text with live match highlighting, capture groups, and flags support all client-side.

Did this tool save you some time? A quick testimonial helps a lot.

Share your experience

About this Regex Tester

Write a regex pattern and test it against sample text with live match highlighting, capture groups, and flags support all client-side.

Usage and privacy

How to use it

Add your input to the workspace above, review the result, then copy or download it when it's ready. No account or installation is required.

Private by design

Regex Tester runs in your browser, so the information you enter stays on your device instead of being uploaded to a server.

Regex Tester examples

A few worked examples so you know what to expect before you paste in your own input.

Extract an email address

Input

Pattern: \b[\w.]+@[\w.]+\.\w+\b
Text: "Contact us at hello@example.com anytime"

Output

Match: hello@example.com
Match a phone number format

Input

Pattern: ^\d{3}-\d{3}-\d{4}$
Text: "415-555-0199"

Output

Match: 415-555-0199 (full match)
No match

Input

Pattern: ^\d{3}-\d{3}-\d{4}$
Text: "415.555.0199"

Output

No match — periods aren't allowed by this pattern, only hyphens.

Frequently Asked Questions

Related Tools