RegexCalc — Clean, Modern Regular Expression Calculator & Tester Guides & Examples
Practical, no-fluff documentation for RegexCalc — Clean, Modern Regular Expression Calculator & Tester — written by people who hit the problems first.
Contact RegexCalc
Contact the operator of regexcalc.net — engine discrepancies, recipe corrections, and feature requests. One human mailbox, replies within two business days.
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.
Developer Sponsor / Partner