LocalFirstTools.com — data tools that never leave your device
No upload — everything runs on your device

Regex Tester

Test regular expressions with live match highlighting. Nothing is uploaded.

The Regex Tester runs your pattern with the browser's own RegExp engine, lists every match with its capture groups, and caps output at 1,000 matches with a zero-length-match guard.

Matches highlighted
Contact us at hello@localfirsttools.com or support@example.org.
Invalid: not-an-email
Match list
  1. #1 @ 14 hello@localfirsttools.comuser=hellodomain=localfirsttools.com
  2. #2 @ 43 support@example.org.user=supportdomain=example.org.
2 matchesMatched locally — nothing leaves this tab

What does the Regex Tester do?

A regular expression describes a text pattern: character classes, quantifiers, anchors, alternation and capture groups. This tester runs your pattern against a test string as you type, highlights every match and lists capture groups — including named groups like (?<year>d{4}).

How does the Regex Tester work?

The pattern and flags are passed to JavaScript's own RegExp constructor and executed against the test string with exec. With the g or y flag it collects every match (guarding against zero-length-match loops); without them it stops at the first. Matching runs entirely in this tab.

Does this upload my text?

No. This page never sends your input to a server — formatting, decoding and hashing all run in this tab, on this device.How that works.

Frequently asked questions

Which regex dialect is this?

JavaScript (ECMAScript), exactly as your browser implements it. Lookbehind, named groups and the s and u flags all work in modern browsers, but PCRE-only syntax like atomic groups or \K will not.

What do the flags mean?

g finds all matches instead of the first, i ignores case, m makes ^ and $ match at line breaks, s lets . match newlines, u enables full Unicode mode, and y anchors each match at the exact position where the previous one ended.

Why does my pattern match an empty string over and over?

Patterns like a* can match zero characters. With the g flag this tool advances one position after every empty match, so it terminates instead of looping forever, and caps the list at 1000 matches.

Do I need to escape backslashes?

No. Type the pattern as you would between / / in JavaScript source — \d, \w, \b and friends work directly. You only need double backslashes when embedding the pattern in a JavaScript string literal.

Related tools

Browse alltext toolsor thefull tool directory.