Skip to content
easytoolapp
  • Home
  • Text
  • Calculators
  • Converters
  • Date & Time
  • Generators
  • Developer
  • Design
  • Device
  • Health
  • Business
  • About
  • Contact
  1. Home/
  2. Developer/
  3. Regex Tester
</>Developer

Regex Tester

Type a JavaScript regular expression and test text. Matches highlight live, capture groups and indices show in a clean list, replace mode previews substitutions, and a cheat sheet keeps syntax close at hand.

Your patterns and test text are processed entirely in your browser.

How to use this regex tester

  1. Type your pattern between the / / and toggle flags (g, i, m, s, u, y).
  2. Paste your test text — every match highlights live with capture groups numbered.
  3. Switch to Replace mode to preview substitutions ($1, $2, $<name>, $&).
  4. Use the common patterns or open the cheat sheet for syntax help.

Frequently asked questions

Which regex flavor is supported?

JavaScript regex (ECMAScript), the same engine your browser uses. That's slightly different from PCRE / Python — most syntax overlaps but lookbehind support and certain Unicode classes vary.

Are matches limited?

The first 200 matches are listed in detail; the highlighter shows all of them. There's a 50,000-match safety stop for runaway patterns.

What about lookbehind?

Modern browsers support both lookahead (?=…)(?!…) and lookbehind (?<=…)(?<!…). The tester runs in your browser, so it matches your browser's exact regex behavior.

Why does my regex work in this tester but fail in my Python or PHP code?

JavaScript regex, PCRE (Perl, PHP), Python's `re` and POSIX all have small but breaking differences: named-group syntax, lookbehind support, Unicode property classes, possessive quantifiers. Test in the engine that will actually run the regex — what works in your browser may not work on the server.

Related tools

</>Developer

JSON Formatter

Format, validate, convert, analyze JSON.

</>Developer

Diff Checker

Side-by-side compare with word diff.

</>Developer

Hash Generator

MD5, SHA-1/256/384/512, HMAC, files.

</>Developer

URL Encoder

Encode, decode or parse URLs.

easytoolapp
AboutContactGuidesPrivacyTerms
© 2026 easytoolappEasy online tools for everyday tasks.
//g
Flags
Highlighted matches2 matches
Reach out to [email protected] or [email protected] — both work.
#1[email protected]@13
$1hello
$2easytoolapp.com
#2[email protected]@38
$1sales
$2example.org
Common patterns (one click loads pattern + sample text)
Regex cheat sheet
Character classes
.Any char (except newline)
\dDigit (0-9)
\DNon-digit
\wWord char (letter, digit, _)
\WNon-word
\sWhitespace
\SNon-whitespace
[abc]Any of a, b, c
[^abc]None of a, b, c
[a-z]Range (lowercase letters)
Quantifiers
*0 or more (greedy)
+1 or more
?0 or 1 (also: lazy)
{n}Exactly n
{n,}n or more
{n,m}Between n and m
*?0 or more (lazy)
+?1 or more (lazy)
Anchors & groups
^Start of input/line (with m)
$End of input/line (with m)
\bWord boundary
\BNon-boundary
(...)Capture group
(?:...)Non-capturing group
(?<n>...)Named group
(?=...)Positive lookahead
(?!...)Negative lookahead
|Alternation (or)