Regular Expression Tester

Write a pattern, see every match highlighted live with capture groups and named groups. The fastest way to debug a regex before it ships.

Highlighted
—
Matches
—
Advertisement

How to use Regex Tester

  1. Enter your pattern and flags (g, i, m…).
  2. Type the test string — matches highlight instantly.
  3. Inspect each match’s groups in the list below.

The tester uses the browser’s native RegExp engine, so it supports every modern feature including lookbehind, named groups and unicode property escapes.

More tools on Dev Toolbox

FAQ

Why does my pattern error?

The message under the pattern is the browser’s own RegExp error — usually an unescaped bracket or a lookbehind in an older browser.

Does it support the g flag?

Yes — without g only the first match shows; with g every match is listed.

Can I test lookbehind?

Yes, in Chrome, Edge, Firefox 78+ and Safari 16.4+.

Like this tool?

Get Very Useful Tools Pro — one $6/month subscription for all tools: ad-free once ads launch, plus bigger batches and higher limits.

Go Pro

Go deeper: how regular expressions really work

Regular expressions look like keyboard noise until you know the pieces. This guide explains the building blocks, greedy vs lazy matching, and the patterns worth memorising — then you can test each one here.

Read the in-depth guide: Regular Expressions Explained →