Regex Tester
Test regular expressions with live match highlighting and capture group inspection.
New to regex? Read our guide →//
3 matches
Test string
paste or type · or drop a .txt file
Highlighted3 matches
Contact: alice@example.com or bob@dev.org — billing@company.co.uk
Matches
1
alice@example.com@ 92
bob@dev.org@ 303
billing@company.co.uk@ 44Flags: g, i, m, s explained
Combining flags like gi is common for case-insensitive global search.
gGlobal — finds all matches, not just the first
iCase-insensitive matching
mMultiline — ^ and $ match line boundaries
sDotAll — . also matches newline characters
Capture groups and named groups
Wrap part of a pattern in parentheses to create a capture group: (\d+) captures digits. The captured text appears in $1, $2, etc.
Named groups (?<year>\d{4}) give the capture a label accessible via the match.groups object. Non-capturing groups (?:...) group for quantifiers without capturing. This tool shows all captured groups below each match.
Common regex patterns for developers
These are starting points; production validation usually needs stricter patterns or a dedicated library.
Email^[\w.-]+@[\w.-]+\.[a-z]{2,}$
UUID[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}
ISO date\d{4}-\d{2}-\d{2}
IP address(\d{1,3}\.){3}\d{1,3}
Semver\d+\.\d+\.\d+