Regex Tester
Test regex patterns and view match results.
▶About this tool
This tool tests regex patterns in real time. Three features: 1) Enter pattern and test text for instant match results, 2) Supports g (global), i (ignore), m (multiline) flags, 3) All processing in browser—no data sent to server. Ideal for validation pattern verification.
Tool interface
Usage
- Enter regex pattern and test text
- Select g (global), i (ignore), m (multiline) flags
- Match results and indices are displayed in real time
When to use
Verifying regex behavior, testing validation patterns, checking extraction patterns for logs.
Examples
[a-z]+ for lowercase, \d{4}-\d{2}-\d{2} for date, ^[\w.-]+@[\w.-]+\.\w+$ for email.
FAQ
What is regex?
Pattern notation for strings. Used for validation, search/replace, log extraction.
What is the g flag in regex?
Global—match all occurrences, not just the first. Without g, only first match is returned.
Regex for email validation?
Simple: ^[\w.-]+@[\w.-]+\.\w+$. Full validation is complex; prefer a library for production.
What does \d mean in regex?
One digit (0-9). \d{4} = 4 digits, \d+ = one or more digits.