Skip to content
Tesserae

Keyboard shortcuts

Focus search
/
This help dialog
?
Run the current tool
Ctrl/⌘ +Enter
Copy the output (when an output is focused)
Ctrl/⌘ +C

Shortcuts are ignored while you are typing in an input, a textarea or a select.

Developer Utilities

Regex Tester

Run a JavaScript (ECMAScript) regular expression against your input. See every match with its capture groups and index, wrap matches in markers, apply a replacement with $1/$<name> references, or split the text on the pattern.

On-device No network Offline-ready

🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.

Try:

Options

The regular expression source, without slashes. Required.

Any combination of g i m s u y.

Supports $& (whole match), $1 and $<name> back-references.

Your result will appear here

Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.

How it works

Four ways to run one pattern

Give it a JavaScript regular expression — source plus flags — and it either lists the matches or transforms the text. List matches returns a table of match number, matched text, a JSON object of capture groups, and the match index. Highlight wraps each match in <<...>>. Replace applies your replacement with $&, $1 and $<name> references. Split cuts the text on the pattern and puts each piece on its own line.

Debugging a pattern before it ships

Use it to find out why a validation regex rejects a real input, to check exactly what a capture group grabs before wiring it into a parser, or to preview a bulk find-and-replace. The index column often reveals an unintended greedy match.

Options that change the answer

Pattern is the regex source without slashes and is required. Flags accepts any combination of g, i, m, s, u and y, each at most once. Mode selects the four behaviours, and Replacement only applies in Replace mode, where $& stands for the whole match. In highlight and list modes a global flag is added automatically.

Caveats

This is the browser's own ECMAScript engine, so it differs from PCRE, Python and Go in the corners. A zero-length match is highlighted as itself rather than wrapped. Invalid patterns and flags surface the engine's error, and Split returns the text between the matches.

Matched inside the tab

The pattern and the text are evaluated by the RegExp engine in your browser and nothing is uploaded. Pasting production log lines into it is safe, and it keeps working offline.

Questions

Which regex flavor is used?

JavaScript (ECMAScript) regular expressions, evaluated with your browser’s built-in RegExp engine.

How are capture groups shown?

In "List matches" mode the Groups column is a JSON object keyed by group number ("1", "2", …) plus any named groups.

Why did I get an "Invalid flags" error?

Only g, i, m, s, u and y are accepted, and each flag may appear once.

See category