RegexCalc Regex Engine

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. /about · updated 2026-10-11 Changelog Dated change history for regexcalc.net — tester behaviour, accessibility fixes, and content additions, straight from the commit log. /changelog · updated 2026-10-11 Contact RegexCalc Contact the operator of regexcalc.net — engine discrepancies, recipe corrections, and feature requests. One human mailbox, replies within two business days. /contact · updated 2026-10-01 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. /guides/dollar-anchor-newline-trap · updated 2026-10-13 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. /guides/lookaround-guide · updated 2026-10-03 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. /guides/pcre-syntax-js-accepts-but-not-how · updated 2026-11-05 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. /guides/redos-protection · updated 2026-10-01 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. /guides/regex-alternatives · updated 2026-10-01 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. /guides/regex-best-practices · updated 2026-10-01 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. /guides/regex-cheatsheet · updated 2026-10-01 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. /guides/regex-gotchas · updated 2026-10-01 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. /guides/regex-hacks · updated 2026-10-01 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. /guides/regex-libraries-2026 · updated 2026-11-02 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. /guides/regex-package-maintenance · updated 2026-11-02 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×. /guides/regex-trends-2026 · updated 2026-11-02 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. /guides/zerowidth-matches-hang-your-loop · updated 2026-10-13
Developer Sponsor / Partner
Copied to clipboard!