ToolVaults

Regex Tester & Replacer

Test JavaScript regular expressions against any string with live match highlighting, capture groups (named and numbered), and optional replace.

Runs 100% in your browser — nothing is uploaded.

//gm
Matches3
Contact ada@example.com or grace@nasa.gov to volunteer.
Alan.turing@bletchley.uk maintains the crypto machines.
Match details
  • #1 @ 8: ada@example.com
    Groups: $1=ada$2=example.com
  • #2 @ 27: grace@nasa.gov
    Groups: $1=grace$2=nasa.gov
  • #3 @ 61: turing@bletchley.uk
    Groups: $1=turing$2=bletchley.uk

Frequently asked

Which regex flavor is this?

JavaScript / ECMAScript regex (via the browser's native RegExp). Very close to Perl-compatible (PCRE) but with a few differences around lookbehinds, unicode, and named groups.

Why is the "g" flag always on?

Without global mode you'd only ever see one match. The tool forces "g" so all matches are shown; other flags are yours to toggle.

What does "sticky" do?

The "y" flag forces the match to start exactly at lastIndex. Rarely useful interactively — mainly for building high-performance tokenizers.

Related tools