Show HN: Match – A pattern matching language that replaces regex (matchlang.com)

3 points by hollowsolve ↗ HN
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

1 comment

[ 1.9 ms ] story [ 10.8 ms ] thread