Developer Tools

Regex Tester

Test regular expressions live with highlighted matches, groups and replace.

Runs in your browser: nothing you enter is uploaded
//g
Quick patterns:

2 matches

Contact ana@example.com or call (555) 014-2290. Order #4521 shipped on 2026-11-07 to https://example.com/track?id=4521. Backup: ben.lee+news@mail.example.org
#MatchPositionGroups
1ana@example.com8
2ben.lee+news@mail.example.org128

Uses JavaScript regular expressions, the same as Node.js and every modern browser. Runs in your browser.

How it works

1

Write your pattern

Type a regular expression, or start from a quick pattern like Email or URL.

2

Add test text

Paste the text you want to search. Matches light up as you type.

3

Check groups and replace

See each match with its groups, and try a replacement with $1 and $2.

Regex Tester features

  • Live highlighted matches as you type.
  • Flags: global, ignore case, multi-line, dot-all and unicode.
  • Capture groups and named groups in a table.
  • Replace preview with $1 style references.
  • Quick patterns for email, URL, phone, date and more.
  • Runs in your browser.

Regex Tester FAQ

Which regex flavor is this?

JavaScript (ECMAScript), the same as Node.js and all modern browsers. Most patterns also work in Python, PHP and Java.

How do I match a whole line?

Turn on Multi-line and use ^ and $, which then match at the start and end of every line.

What does the g flag do?

It finds all matches instead of stopping at the first one.

How do I use groups in replace?

Wrap part of the pattern in brackets, then use $1, $2 in the replace box.

Related Developer Tools

Recent from the blog