Skip to main content
InstantTools
Forge · Pattern matching

Regex Tester

Write a pattern, paste a sample, see every match in real time. Capture groups, named groups, replacement preview — all local.

//gi
Contact us at hello@example.com or support@mydomain.io — and cc billing@example.org.
3 matches
Matches
#1 · @14"hello@example.com"
$1 = "hello"$2 = "example.com"
#2 · @35"support@mydomain.io"
$1 = "support"$2 = "mydomain.io"
#3 · @64"billing@example.org"
$1 = "billing"$2 = "example.org"
Contact us at hello [at] example.com or support [at] mydomain.io — and cc billing [at] example.org.

How to use Regex Tester

  1. Type your pattern in the Pattern field without the surrounding slashes. The tool draws the slashes and the active flags around it.
  2. Click the flag buttons to turn on i (ignore case), m (multiline), s (dotAll), or u (unicode). Hover any button to see what it does.
  3. Paste your sample into Test string. Matches highlight in the box below it, with a running match count. A broken pattern shows the browser's error message instead.
  4. Read the Matches list for each match's position (@index) and its groups, shown as $1, $2 and by name.
  5. Type a replacement such as $1 [at] $2 or $<user> into the Replacement field to see the whole string after the replace.
01 · Real-world fits

Common use cases

  • Finding out why a form validation pattern accepts an email address or phone number it should reject
  • Pulling order IDs, dates, or URLs out of a pasted log excerpt and confirming every one is caught
  • Previewing a find-and-replace before running it across files in your editor or in a String.replace() call
  • Reformatting dates: (\d{4})-(\d{2})-(\d{2}) with the replacement $2/$3/$1 turns 2026-10-04 into 10/04/2026
  • Checking named groups like (?<year>\d{4}) before wiring match.groups into your code
02 · The honest pitch

Why Regex Tester?

Your pattern runs through the browser's own RegExp engine, so it follows the same rules as the JavaScript, TypeScript, or Node code you will paste it into. Each match lists its character index and every group, numbered and named, and the replacement preview updates on every keystroke. Testing happens in the page: your pattern and sample text are not sent to a server.

03 · Edge cases

Frequently asked questions

JavaScript (ECMAScript), through your browser's built-in RegExp. That covers lookahead (?= ) and (?! ), lookbehind (?<= ) and (?<! ), named groups (?<name> ), and Unicode property escapes like \p{L} when the u flag is on. PCRE, Python, and .NET extras such as possessive quantifiers (a++), atomic groups, recursion, and the \A and \Z anchors either throw an error here or mean something else.