Regex tester

Type a JavaScript regular expression and test text — matches highlight live as you type, with capture-group breakdown and a replacement preview. Uses native ECMAScript regex semantics.

Regex tester

/ /
Replace with: ($1, $2 = capture groups)

Regex flags reference

  • g — global; find all matches, not just the first
  • i — case-insensitive
  • m — multiline; ^ and $ match line boundaries
  • s — dotall; . also matches newlines

Common patterns

  • Email: \b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b
  • URL: https?:\/\/[\w.-]+\.[a-z]{2,}\/?\S*
  • IPv4: \b(?:\d{1,3}\.){3}\d{1,3}\b
  • Date YYYY-MM-DD: \b\d{4}-\d{2}-\d{2}\b

FAQ

Which regex flavour is this?

JavaScript / ECMAScript. It's close to PCRE but missing a few features (no atomic groups, no possessive quantifiers, no lookbehind support before ES2018).

Is my text sent anywhere?

No. The regex runs entirely in your browser.

Related calculators