Regex Tester

Test regular expressions with live match highlighting, flags, and captured groups.

/ /

📐 How to Use

  1. Enter your regular expression in the pattern field.
  2. Select flags (g = global, i = case insensitive, m = multiline, s = dotAll).
  3. Type or paste your test string — matches highlight live.
  4. Scroll down to see each match with its index and any captured groups.

Frequently Asked Questions

QWhat regex flavour does this use?
JavaScript's built-in RegExp engine, which follows the ECMAScript standard. It supports most common regex features including lookaheads, named groups, and Unicode.
QWhat does the "g" flag do?
Without the global flag, only the first match is found. With "g", all matches in the string are highlighted.
QCan I test named capture groups?
Yes — named groups like (?<year>\d{4}) are supported and displayed in the match details.

ℹ️ About This Tool

Uses the browser's native RegExp object for matching — no libraries needed. Highlighting is applied using a range-based approach that preserves original text structure.