Skip to content
TypeParser
All tools

Regex Tester

Test, explain, and inspect regular expressions.

beats regex101.com edge: Plain-English explainer + group inspector + presets
pattern
/ /
test string
plain English
enter a pattern
matches0
Guide

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:

  1. Paste sample text in the bottom pane.
  2. Type your pattern in the top input.
  3. Toggle flags as you go (g, i, m, s, u, y).
  4. 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
  • URLhttp(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?
JavaScript regex (ECMAScript). That covers most browser, Node.js, Deno, and Bun work. PCRE-only constructs like (?P<name>...) Python syntax need to be translated — use (?<name>...) instead.
Are lookbehinds supported?
Yes. Modern browsers (Chrome 62+, Safari 16.4+, Firefox 78+) all support lookbehind. The tester runs in your browser, so support is whatever your browser supports.
How do flags work?
Toggle 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.
regex101 defaults to PCRE which has features (atomic groups, possessive quantifiers, conditionals) JavaScript lacks. Switch regex101 to "ECMAScript (JavaScript)" flavor for an apples-to-apples comparison.
Can it test very long input?
Yes — the matcher runs on a Web Worker and aborts after 2 seconds to protect against catastrophic backtracking. If your pattern hangs, that is a real warning to redesign — production servers have the same problem.
Does it record my pattern?
No. Patterns and test text live only in your browser. We do not log, persist, or sync. Refresh the page and they are gone.

Related tools

Last updated: 2025-01-15