Lobsters19 min read
Readable Regular Expressions for JavaScript/TypeScript, Inspired by Emacs' rx
/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/; // Take // your // time... // // ...still decoding? // // OK, keep reading :)
By rahuljuliato.com via confusedalexLobsters

Read the full story
Originally published by Lobsters on Oct 2, 2026.
Comments
Sign in to join the discussion.