What is Regex Tester?
Regex Tester is a free online tool for testing regular expressions against text in real time. It highlights matches, shows capture groups, and supports find-and-replace — all in your browser.
How to use
- Enter a regex pattern in the pattern field
- Toggle flags (g, i, m, s, u) as needed
- Type or paste your test string
- Matches are highlighted instantly in the output panel
- Click "Replace" to enable find-and-replace mode with substitution patterns ($1, $2, etc.)
Features
- Real-time matching — results update as you type
- Match highlighting — matched text is visually highlighted
- Capture groups — named and numbered groups shown in match details
- Replace mode — test substitution patterns with $1, $2, named groups
- Sample patterns — quick-load patterns for emails, URLs, IPs, and dates
- Flag toggles — visual buttons for g, i, m, s, u flags
Supported flags
- g (Global) — find all matches, not just the first
- i (Case-insensitive) — ignore uppercase/lowercase
- m (Multiline) — ^ and $ match start/end of each line
- s (Dotall) — . matches newline characters
- u (Unicode) — enable full Unicode matching
Limitations
- Maximum test string: 200,000 characters
- Maximum pattern length: 10,000 characters
- Maximum matches displayed: 1,000
- Uses JavaScript regex engine (PCRE features like lookbehind may vary by browser)
- Does not support regex flavors from other languages (Python, Java, etc.)