Azlaan Electric AC Solar Center — Solar, CCTV, AC & electrical work, Faisalabad Call: 0300-8987448

Regex Visual Explainer

Paste a regular expression and this tool breaks it into tokens, explains each token in plain English, highlights every match in your test text, and warns you about common regex mistakes.

Example: [\w.+-]+@[\w-]+\.[\w.]+ matches an email address.
g all matches · i ignore case · m line anchors · s dot matches newlines · u unicode

Token map

Each colored block is one token of your pattern, in order.

TokenTypeWhat it means

Matches in your test text 0

Warnings and tips

How to use

  1. Type or paste a regular expression in the first box, without the surrounding slashes.
  2. Add your test text and choose flags, then press Explain Pattern.
  3. Read the token map to learn what each part of the pattern does.
  4. Check the highlighted matches and the warnings before using the pattern in your own code.

Good to know

  • A dot . matches any character, so write \. when you mean a real dot.
  • .* is greedy and matches as much as possible; .*? is lazy and matches as little as possible.
  • Round brackets ( ) remember what they match; (?: ) groups without remembering.