RegexCalc Guides & Examples
Practical, no-fluff documentation for RegexCalc — written by people who hit the problems first.
About RegexCalc
What regexcalc.net is, which syntax its JavaScript runtime actually accepts and rejects, and what the tester deliberately does not do.
Changelog
Dated change history for regexcalc.net — tester behaviour, accessibility fixes, and content additions, straight from the commit log.
Contact RegexCalc
Contact the operator of regexcalc.net — engine discrepancies, recipe corrections, and feature requests. One human mailbox, replies within two business days.
Your Regex Was Fine: $ and . Mean Different Things in Every Engine
Measured on Node 24, Python 3.12, Go RE2, and GNU grep 3.11: $ against a trailing newline, . across lines, and the grep spelling that actually matches CRLF.
Lookaround Guide: Lookaheads, Lookbehinds, and What Each Engine Actually Allows
Verified support matrix for JS, PCRE2, and RE2 lookaround — including the myth that JS lookbehind must be fixed-length — with six production patterns and lookahead-driven replace tricks.
Regexes That Show 'Pattern Valid' and Match Nothing
PCRE syntax you copied is often legal JavaScript with a completely different meaning. Green status, zero matches, no warning. Eight patterns run through the shipped engine with exact output.
ReDoS Protection: Anatomy of (a+)+ and How to Never Ship It
Catastrophic backtracking explained step by step with measured timings from Node v24 — why (a+)+ explodes on rejection, which rewrites fix it, and when the RE2 escape hatch applies.
Regex Engines Compared: RE2 vs Rust regex vs PCRE2 vs JavaScript
Honest engine comparison — RE2's DFA guarantees, the Rust regex crate, PCRE2's backtracking power, and JS/PCRE compatibility traps. Why one pattern runs in microseconds on one engine and hangs on another.
Regex Best Practices: Writing Patterns That Don't Explode
Practical JavaScript regex discipline — anchors, character classes over dot, lazy vs greedy, capture hygiene, the ReDoS trap, and flags most people use wrong.
The Regex Cheatsheet: JS vs PCRE2 vs RE2, Plus 20 Recipes That Actually Work
One-screen regex syntax primer, an engine support matrix for the tricky constructs, and 20 copy-paste patterns verified on Node v24 — email-ish, URL, IPv4, semver, CSV, and the honest limits of each.
Regex Patterns and Gotchas: Catastrophic Backtracking and the Rest
Why (a+)+ hangs, capture-group renumbering, lastIndex state on the g flag, split() surprises, and the empty-match loop that never ends.
Regex Hacks: Sticky Tokens, Lookahead-AND, and the lastIndex Clipboard Walk
Eight verified JavaScript regex tricks — named groups in replace callbacks, matchAll as an iterator, lookahead-as-AND validation, the y flag for tokenizers, split that keeps delimiters, and modulo tricks with position math.
Regex Libraries in 2026: Safety Tooling Grew Faster Than Syntax Sugar
npm download counts for regex engines, safety checkers, and parsers over 2024–2026, why ReDoS detection outran every convenience library, and what a 115× engine row really means.
The Regex Packages You Depend On Have One Maintainer Between Them
Release dates, maintainer counts, and dependency weight for the eight npm regex packages that carry the most traffic, checked against the registry. Plus the two that are growing fastest and the state they are in.
Regex Tooling in 2026: The Library That Stopped Growing
Two years of npm download data for regex and adjacent tooling, measured runtime support for modern regex syntax — and why library growth flattened while pattern-consuming tools grew from +249% to +130×.
The Empty Match That Never Stops: Zero-Width Results in JS Regex Loops
Why /a*/g on "bbb" spins forever, why lastIndex never moves, what matchAll and split do instead, and the one-line guard. Measured on Node 24.
Developer Sponsor / Partner