Skip to main content
T

Regex Tester

Test JavaScript regular expressions live — see matches highlighted in your text and captured groups in a list.

More options

Common Pattern Library

Click any pattern to load it into the tester:

Quick Regex Cheatsheet

Character Classes
. Any character
\d Digit [0-9]
\w Word char [a-zA-Z0-9_]
\s Whitespace
\D Non-digit
\W Non-word char
Anchors & Boundaries
^ Line start
$ Line end
\b Word boundary
\B Non-boundary
Quantifiers
* 0 or more (greedy)
+ 1 or more (greedy)
? 0 or 1 (optional)
*? 0 or more (lazy)
{n} Exactly n times
{n,m} n to m times
Groups & Lookarounds
(...) Capturing group
(?:...) Non-capturing group
(?=...) Positive lookahead
(?!...) Negative lookahead
Send output to:
Advertisement

How to use Regex Tester

  1. Type your regex pattern.
  2. Pick flags.
  3. Paste test text — matches highlight live.

What is Regex Tester?

Build and debug regular expressions quickly: type a pattern, toggle flags (g, i, m, s, u), and see matches highlighted in your test text. Captured groups appear next to each match for easy verification.

Advertisement

FAQ

Which regex flavor?
JavaScript regex (ECMAScript). Lookaheads, lookbehinds, character classes, capture groups, named groups all supported.
What is the safety limit?
Caps at 100,000 matches per run to prevent runaway patterns.

Related tools

Advertisement