RT

Regex Tester

Developer Tools · Free · Runs entirely in your browser

Enter a regex pattern and test text — matches highlight live, with match count and capture groups.

Advertisement
Pattern
Result
Advertisement

How to use — Regex Tester

  1. Write the regex pattern (without slashes) — e.g. \d{10} for phone numbers.
  2. Choose flags — g (all matches), i (case-insensitive), m (multiline).
  3. Paste test text — matches highlight live, along with groups.

FAQ

Which regex flavor is used?

JavaScript (ECMAScript) regex — the one that runs in browsers and Node.js. Slightly different from Python/PCRE (e.g. lookbehind support depends on the browser).

What are some common patterns?

Email: [\w.+-]+@[\w-]+\.[\w.]+ | 10-digit phone: [6-9]\d{9} | ZIP/PIN code: \d{6} | Date: \d{2}/\d{2}/\d{4}

What does the g flag do?

Global — finds ALL matches in the text. Without g, only the first match is found. Keep g on for most cases.

How do I see capture groups?

Add () in the pattern — e.g. (\d{2})/(\d{2}) has two groups. Group values are shown below each match.

Advertisement