Regex Lab

Test, explain, replace.

A regex playground that highlights matches inline, breaks out capture groups, and previews replacements in real time. JavaScript flavour, every flag supported.

//gi

Test string

Matches in context

Send invoices to billing@example.com and copy ops@acme.co. Skip noreply@example.com.

Matches (3)

  • billing@example.com@17
    • $1 billing
    • $2 example.com
  • ops@acme.co.@46
    • $1 ops
    • $2 acme.co.
  • noreply@example.com.@64
    • $1 noreply
    • $2 example.com.

Replacement

Send invoices to billing [at] example.com and copy ops [at] acme.co. Skip noreply [at] example.com.

JavaScript flavour

Uses the same regex engine your app uses in the browser — so if it works here, it works in your code.

Named groups

Supports (?<name>…) and shows each capture group beside its match — no more squinting at $1.

Replace preview

Type a replacement with backreferences and watch the rewrite update live. Copy when it looks right.