Regex Tester
Test regular expressions with live match highlighting.
Common patterns
Click to load into the pattern field
Test string
Capped at 20,000 characters to avoid catastrophic backtracking.
Highlighted matches
Capture groups
| # | Match | Index | Groups |
|---|---|---|---|
| 1 | ada@example.com | 9 | ada, example |
| 2 | alan@test.com | 26 | alan, test |
Replace preview
About the Regex Tester
Write and test regular expressions with live highlighted matches, a capture group table, a replace preview, and a cheatsheet of common patterns. Input length is capped to avoid catastrophic backtracking.
Examples
Email match
(\w+)@(\w+)\.comOutput
Matches ada@example.comRelated tools
Regex Cheatsheet
Dev Utilities
Searchable regex syntax reference with examples and copy buttons.
.htaccess Redirect Generator
Dev Utilities
Generate Apache .htaccess redirect and rewrite rules.
Chmod Calculator
Dev Utilities
Unix permission calculator: checkboxes, octal, and symbolic.
Code Comment Stripper
Dev Utilities
Remove comments from JS, HTML, Python, or SQL source.
Code Diff Merger
Dev Utilities
Side-by-side line diff of two code snippets with stats.
Cron Expression Builder
Dev Utilities
Build cron expressions visually with a human-readable description.
Frequently asked questions
Read more
- Regex patterns every developer should know
A working set of regular expressions for emails, URLs, whitespace and validation — plus how to test them safely.
- Writing safer regular expressions: avoiding catastrophic backtracking
ReDoS bugs come from a small number of recognizable patterns. Here's how to spot them and write regexes that stay fast on any input.
Version 1.0.0 · Updated 2026-08-06 · Runs entirely in your browser