Advertisement

Regex Pattern Tester & Explainer

Test a regular expression against your own text with live match highlighting, plus a plain-English breakdown of exactly what each part of the pattern is doing.

100% Free No Sign-Up Runs In Your Browser

Test your regex pattern

Advertisement
/ /

Matches

How to use this tool

  1. 1
    Enter your pattern. Type or paste a regular expression into the field between the slashes.
  2. 2
    Paste your test text. Matches highlight instantly as you type, in both fields.
  3. 3
    Read the breakdown. Scroll down to see a plain-English explanation of what every part of your pattern actually does.

About This Tool

Regular expressions are compact by design, which makes them fast to write and painful to read back later — especially someone else's pattern, or your own from six months ago. This tool solves both problems at once: it shows you exactly what matches in real text, and it translates the pattern itself into plain English, piece by piece.

It understands character classes, quantifiers (including lazy versions), anchors, capturing and non-capturing groups, named groups, lookaheads, lookbehinds, and backreferences.

Frequently Asked Questions

What do the flag checkboxes do?

g finds all matches instead of stopping at the first one, i ignores uppercase/lowercase, m makes ^ and $ match the start/end of each line instead of just the whole string, and s lets a dot (.) match newline characters too.

Why does the match count stay the same when I uncheck "g"?

The highlighting always shows every match so you can see the full picture — unchecking "g" only affects how the pattern would behave if you used it in actual code, like with .test() or .match().

What does "lazy" mean in the breakdown?

A lazy quantifier (like *? or +?) matches as few characters as possible instead of as many as possible, which changes the result when there are multiple ways a pattern could match.

Is my pattern or text uploaded anywhere?

No. Everything runs locally in your browser. Nothing you type is sent anywhere or saved after you close the tab.