Regex Tester
Test JavaScript regular expressions with live match highlighting and capture groups.
Phone: (415) 555-2671
Date: 2026-05-26
URL: https://b-e-a-d.com/tools/regex-tester
- #1
alice@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 occurrencesi— case insensitivem— multiline,^/$match line breakss— dot matches newlinesu— 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
- Find & ReplaceBulk find-and-replace over text with optional regex, case sensitivity, and whole-word matching.
- Regex Cheat Sheet & BuilderBrowse regex tokens, click to build, and try the result against a sample — all in one place.
- ANSI Escape StripperRemove ANSI color codes and terminal control sequences from CI logs or terminal captures.
- Comment Style ConverterTranslate //, #, --, ;, %, /* */, and <!-- --> comments between languages while preserving indentation.