What is a regex tester?
A regex tester takes a regular expression and sample text, runs the pattern against the text, and shows you every match, usually with the matching characters visually highlighted, the index where each match starts, and any captured groups expanded. It is the fastest way to debug a regex that "almost works" without round-tripping through your application code.
ZipKit's Regex Tester runs entirely client-side. Your pattern and your sample text never leave your browser, which matters when the test data contains emails, tokens, customer IDs, or anything else you can't paste into a third-party site.
How to use this tool
1. Type or paste a pattern into the slash-bracketed input. Don't include the surrounding /.../, the tool adds them visually. 2. Toggle flags with the small chips: g (global, find every match), i (case-insensitive), m (multiline ^/$), s (dot matches newlines), u (Unicode), y (sticky). 3. Replace the sample text with whatever you actually want to match against. Highlights update on every keystroke (180 ms debounce). 4. Inspect the match list below the test text, index, length, capture groups, named groups.
The "Common patterns" card on the right loads 20 production-tested regexes (email, URL, IPv4/IPv6, UUID, hex color, hashtag, slug, …), click any of them to drop the pattern into the input.
Regex flags, briefly
g(global), return every match instead of just the first. Most testers leave this on by default.i(ignore case), matchEmailandEMAILandemailinterchangeably.m(multiline), make^and$match at every line break, not just the start/end of the whole string.s(dotAll), let.match\n. Useful when you want a single regex to span multiple lines.u(unicode), enable proper Unicode handling, including astral plane characters and\p{Letter}property escapes.y(sticky), only match starting fromlastIndex. Specialised; you usually wantg, noty.
What the engine actually runs
This tool uses the browser's native RegExp engine, the same engine your JavaScript code will use in production. There's no translation layer, no PCRE shim, no Python re semantics. If a pattern matches here, it matches in your code; if it errors here, it errors in your code with the same message.
That means PCRE-only features won't work: no possessive quantifiers (a++), no atomic groups ((?>...)), no backtracking control verbs. JavaScript regex supports lookbehind ((?<=…) / (?<!…)) since modern engines, named groups ((?<name>…)), and Unicode property escapes (\p{…}) when the u flag is set.
Capture groups
When your pattern uses parentheses, each parenthesised sub-pattern is a capture group. The tool lists groups under each match, numbered group 1, group 2, … in the order their opening paren appears. If a group's body never matched (because it was inside an alternation that took the other branch), the tool shows (undefined).
For named groups, (?<year>\d{4})-(?<month>\d{2}), the names appear directly under the group list, so you can copy field names straight out of the tester into your code.
Match-count and performance
The tester caps at 5,000 matches per run to keep the page responsive. Patterns with catastrophic backtracking (e.g. (a+)+b against a 50-character a-string) will pin a CPU core for several seconds, the browser may even mark the page unresponsive. If the tool feels slow, simplify the pattern or use anchors (^, $, \b) to constrain the search.
Common gotchas
- Forgot
\b,catmatches insideconcatenate. Add word boundaries when you want whole-word matches. - Greedy vs lazy,
<.>matches<b>bold</b>as one big chunk. Use<.?>(lazy) to match each tag separately. - Escaping in source code, JavaScript strings double backslashes.
\\bin a string literal becomes\bin the regex. The tester takes the raw regex, not a JavaScript-string-escaped version. gandlastIndex,RegExp.prototype.execwith thegflag advanceslastIndexeach call. The tester resets it for you, but be aware of this in your own code.
Privacy
Your pattern, your test text, and the match results stay in your browser. Nothing is sent to a server. Recent inputs are stored only in your browser's local storage and can be cleared from the "Recent" card.