Regex Tester — Live Match Highlighting + Capture Groups

Test JavaScript / PCRE regular expressions with live match highlighting, capture groups, and replace preview. Supports global, case-insensitive, multiline flags. 100% client-side.

/ /

Capture Groups

Common regex patterns

  • \w+@\w+\.\w+ — Email (simple)
  • https?:\/\/[^\s]+ — URL
  • \d{4}-\d{2}-\d{2} — Date (YYYY-MM-DD)
  • ^\s*$ — Empty line (use m flag)
  • (?<name>\w+) — Named capture group

Flag reference

  • g — global, find all (not just first)
  • i — case-insensitive
  • m — multiline, ^ $ match per line
  • s — dotall, . matches newline
  • u — Unicode mode