What is a Regex Tester?

A regex tester lets you write a regular expression and immediately see which parts of your test string it matches — without running code. This tool highlights every match inline, lists captured groups in a table, and explains each token in your pattern in plain English, making it easy to iterate on complex patterns.

How to Use

  1. Enter your pattern in the Pattern field (without delimiters).
  2. Toggle flags: g (global), i (case-insensitive), m (multiline).
  3. Paste your test string — matches are highlighted in real time.
  4. Use quick-insert buttons (Email, URL, IP, Phone) to load common patterns instantly.
  5. Check the capture groups table and the plain-English explanation below.

Common Regex Mistakes

  • Forgetting the global flag — Without g, only the first match is returned.
  • Unescaped special characters — Characters like . * + ? must be escaped with \ when you mean the literal character.
  • Greedy vs lazy quantifiers.* matches as much as possible; append ? (.*?) for a lazy (minimal) match.
  • Anchors missing — Without ^ and $, the pattern can match anywhere inside a longer string.

FAQs

Which regex flavor does this use?

JavaScript's built-in RegExp engine (ECMAScript). Syntax is compatible with most modern languages but differs from PCRE in areas like lookbehind and named groups.

What does the multiline flag do?

With m, ^ matches the start of each line and $ matches the end of each line, rather than the start/end of the entire string.

Can I use named capture groups?

Yes. Use (?<name>pattern) syntax. Named groups appear alongside numbered groups in the capture groups table.