About Regex Tester
Test regular expressions against your sample text and see every match highlighted live. The plain-English explainer breaks your pattern down character by character so you can debug a complex regex without re-reading PCRE docs. Named and numbered groups appear in a dedicated inspector. Presets cover the patterns developers reach for daily — email, URL, IPv4, UUID, semantic version.
How regex testing should feel
A good regex tester does four things: highlights every match, names every capture group, explains the pattern in plain English, and refuses to hang on catastrophic backtracking. This tester does all four, locally, in your browser.
The classic flow:
- Paste sample text in the bottom pane.
- Type your pattern in the top input.
- Toggle flags as you go (
g,i,m,s,u,y). - Watch matches highlight and groups populate in real time.
The Explain panel walks the pattern token by token: anchors, character classes, quantifiers, groups, alternations. If your team has a regex that nobody understands anymore, paste it here, expand the explainer, and the comments write themselves.
Common patterns we ship as presets
- Email — RFC 5322 simple form
- URL —
http(s)://with optional path - IPv4 — four octets, 0-255 each
- UUID — v1, v4, v7 compatible
- SemVer — major.minor.patch with prerelease and build
- Hex color —
#RGB,#RGBA,#RRGGBB,#RRGGBBAA - ISO 8601 date — full and short forms
- Slug — lowercase, hyphenated, alphanumeric
Click any preset to load it into the pattern field. Edit from there.
Common workflows
Validating user input. Test the pattern against the dirtiest real samples you have — emails with subdomains, names with apostrophes, phone numbers with extensions. If your regex breaks here, it will break in production.
Extracting data from logs. Build a pattern with named groups, watch the Groups panel populate. Once it works, the same pattern drops into String.prototype.matchAll or re.findall unchanged.
Cleaning up text. Combine with Find & Replace — design the regex here, copy it over with capture groups, run the substitution against a full document.
Why regex still matters
Languages keep adding shorthand for parsing — String.prototype.split, URL, URLPattern, structured loggers. Regex remains the lingua franca: portable across every language, learnable in an afternoon, dense enough to express almost anything text-shaped. Spend 20 minutes with a tester this fast, and the skill compounds for the rest of your career.
Frequently asked questions
Which regex flavor does this support?
(?P<name>...) Python syntax need to be translated — use (?<name>...) instead.Are lookbehinds supported?
How do flags work?
g (global), i (case-insensitive), m (multiline), s (dotAll), u (unicode), y (sticky). Each flag tooltip explains exactly what changes about matching.My pattern matches in regex101 but not here.
Can it test very long input?
Does it record my pattern?
Related tools
Last updated: 2025-01-15