Skip to content
BEAD

Regex Tester

Test JavaScript regular expressions with live match highlighting and capture groups.

Pattern
//
Highlighted matches
Email: alice@example.com
Phone: (415) 555-2671
Date: 2026-05-26
URL: https://b-e-a-d.com/tools/regex-tester
1 match
  1. #1alice@example.com[7, 24)

🔒 Patterns run entirely in your browser.

About this tool

Uses the JavaScript RegExp engine — the same one your browser uses. Patterns here behave like patterns in your code. PCRE features like lookbehind variable length, recursion, or possessive quantifiers may differ.

Flag cheatsheet

  • g — global, match all occurrences
  • i — case insensitive
  • m — multiline, ^/$ match line breaks
  • s — dot matches newlines
  • u — unicode escapes

Frequently asked

What regex flavor does this use?

ECMAScript regex — what runs in your browser. It supports most of what you'd write in Python, Go, or Ruby, but not Perl's recursive patterns or .NET balanced groups. If you need a specific flavor, test in that environment too.

Why are my matches different from grep?

grep uses POSIX BRE/ERE by default which is more restrictive. Try grep -P for Perl-compatible matching. Common gotchas: \d means [0-9] in JS but [[:digit:]] in POSIX, and \b means word boundary in JS but backspace in POSIX.

How do I test a multi-line pattern?

Add the m flag — it makes ^ and $ match at line boundaries instead of just start/end of input. Add s to make . match newlines (otherwise it doesn't).

You might also like