Show HN: Match – A pattern matching language that replaces regex

I built Match, a pattern matching language designed to replace regex. Instead of cryptic escape sequences, you describe patterns in plain English.

Example — matching an email address:

email: username then "@" then domain

username: one or more of (letter, digit, ".", "_", "-")

domain: one or more of (letter, digit, "-") then "." then between 2 and 6 letters

Key differences from regex:

- Human-readable grammar syntax - Full parse trees with named extractions - No backtracking, no ReDoS by design - Composable grammar modules (use "module" (rule1, rule2)) - Zero dependencies, ~15KB

Available on npm (@hollowsolve/match). Docs, playground, and examples on the site.

GitHub: https://github.com/hollowsolve/Match

3 points hollowsolve 8 months ago 0 comments

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton