Regular Expression Tester

Pattern + flags + test string → live matches, groups and highlighting.

Quick answer: Free regex tester: test JavaScript regular expressions with live match highlighting and capture groups. Cheat-sheet included. Runs in your browser.

Matches found
Quick cheat sheet
\d digit • \w word char • \s whitespace • . any char • + one or more • * zero or more • ? optional • [abc] set • (a|b) or • ^ start • $ end • {2,4} quantifier

How to use

  1. Open this page on any device — no signup needed.
  2. Fill in the fields above.
  3. Get your result instantly — nothing is uploaded.

About this tool

Regular expressions (regex) find patterns in text — emails, phones, log lines, code. This tester runs your pattern against a test string with live highlighting and shows capture groups per match. Flags control behaviour: g (all matches), i (case-insensitive), m (multiline anchors). Start with \d+ (digits) or \w+@\w+\.\w+ (simple email) from the cheat sheet.

FAQ

Which regex flavor is used?
JavaScript (ECMAScript) — the same engine as Node and browsers.
Why does my match loop forever?
Zero-length matches are guarded automatically; also avoid patterns like a* without /g limits.
What are capture groups?
Parentheses () capture parts of a match — listed per match below the highlighter.