Regex Tester
Test regular expressions with real-time matching, group extraction, and replace mode. Includes common pattern reference library.
Common Patterns (click to use)
Flags
Enter a regex pattern and test string, then click Test Regex to see matches.
About This Tool
Test regular expressions (regex) against any text with real-time feedback. This free online regex tester highlights all matches, shows captured groups, and supports a replace mode — all running locally in your browser. Perfect for developers debugging patterns or learning regex syntax.
Flags: Global (g) finds all matches instead of just the first. Case Insensitive (i) ignores letter case. Multiline (m) makes ^ and $ match line boundaries. Dot All (s) makes . match newlines. Unicode (u) enables full Unicode matching for emoji and international characters.
Match Highlighting: All matches are visually highlighted in your test string with color-coded backgrounds, making it easy to see exactly what was captured. Each match includes its index position and captured group values.
Replace Mode: Toggle the Replace button to enter a substitution pattern (e.g., $1, $&) and see the result of running a regex replace operation. Useful for data transformation, formatting, and text cleanup tasks.
Common Patterns Library: Click any chip from the pattern library to instantly load common regex patterns for emails, URLs, IP addresses, phone numbers, dates, hex colors, and more. Great starting points for building your own patterns.