Regex
Regex Tester
Type a pattern, paste sample text, and see every match highlighted instantly — with capture groups broken out below.
Pattern
//g
Sample text
Contact us at hello@formulaforge.dev or support@example.com for help.
Matches
2 matches- #1 at index 14: hello@formulaforge.dev
- #2 at index 40: support@example.com
How it works
This tester uses your browser's native JavaScript regex engine, so results match exactly what you'd get in production JavaScript code. Toggle flags to change matching behavior: g finds all matches instead of just the first, i ignores case, m makes ^/$ match line boundaries, and s lets . match newlines.
Matches are highlighted directly in your sample text, and each individual match — including any capture groups — is listed below with its position in the string.
Examples
Email addresses
Matches most common email formats.
\b[\w.+-]+@[\w-]+\.[a-zA-Z]{2,}\bUS phone numbers
Matches formats like (555) 123-4567.
\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}Hex color codes
Matches #fff or #ffffff.
#(?:[0-9a-fA-F]{3}){1,2}\b