Regex tester

Write a pattern, see what it matches as you type, and read off the capture groups for each hit. Built for the moment when a pattern works on one string and inexplicably fails on the next.

Matching runs in this page using the browser's own regular expression engine, so what you see is exactly what JavaScript will do with the same pattern and flags — including lastIndex behaviour with the global flag.

Runs entirely in this tab. Nothing you paste is uploaded, logged or stored — close the page and it is gone.

Questions about this tool

Why does my pattern behave differently here than in another language?

This runs the JavaScript engine, and matching is what JavaScript will do. Lookarounds, Unicode property escapes and named groups are supported; some constructs from PCRE, Python or .NET are not.

What does the g flag change?

Without g the engine returns the first match. With g it walks the whole string and returns every match, and the index it last stopped at is carried between calls — a common source of surprises when a pattern object is reused.

Can it explain what a pattern means?

It shows matches and captured groups, which is usually enough to see where a pattern goes wrong. It does not translate a pattern into prose.

AI alternatives from the directory

Browse coding tools →

This utility handles the job by hand. These do it with a model — worth a look when the task outgrows copy and paste.

Codeium logo
Codeium
Coding
☆

Free AI autocomplete for every language

A fast, free completion and chat tool that plugs into 40+ editors with strong privacy options.

Claude Code logo
☆

Anthropic's terminal agent that edits whole repos

Claude Code runs in your shell, reads the repository, plans a change and applies multi-file edits with tests.

CodeGeeX logo
CodeGeeX
CodingCN
☆

Code generation and translation

Coding assistant that generates code, translates between languages and writes comments, covering 20+ languages.