/regex-tester
Writer & Dev

Regex Tester Online: Test JavaScript Regular Expressions Live

Test JavaScript regular expressions with live match highlighting, capture groups, and a replace preview. Pick flags g, i, m, s, u, y in one click.

Runs in your browser — your text is never uploaded or stored.
//
Test text
Matches highlighted
Contact ada@example.com or grace@navy.mil for details.
Matches (2)
  • match 1: ada@example.com @ 8
    $1=ada$2=example.com
  • match 2: grace@navy.mil @ 27
    $1=grace$2=navy.mil
Replace preview

How to Use

  1. 1.Type your regex pattern and pick flags (g, i, m…).
  2. 2.Paste the test text — matches highlight in real time.
  3. 3.Optionally add a replacement string to preview the substitution.
Advertisement

FAQ

Which regex flavor does it use?

JavaScript's built-in RegExp — the same engine that runs in your browser and Node.js. That means PCRE features like recursive patterns are not supported.

Does it show capture groups?

Yes. Each match lists its numbered and named capture groups so you can debug complex patterns quickly.

Is my regex or test text uploaded?

No. All matching happens locally with the native RegExp engine.

Related tools

More text utilities