Show HN: Match – A pattern matching language that replaces regexmatchlang.com3 ポイント·投稿者 hollowsolve·5 か月前·0 コメント
hollowsolve·5 か月前·議論We built Match, a pattern matching language that compiles to WASM and replaces regex with readable grammars.Instead of this: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$You write this:email: username then "@" then domainusername: one or more of (letter, digit, ".", "_", "-")domain: one or more of (letter, digit, "-") then "." then between 2 and 6 lettersMatch features:- WASM JIT + JS JIT: matches or beats native regex on most patterns- Linear-time parsing, no backtracking, no ReDoS, ever- Full parse trees with named extractions, not just match/no-match- Zero dependencies, ~7KB, MIT licensed- Composable grammars via modulesWebsite: https://matchlang.comPerformance: https://matchlang.com/docs/api/performanceGitHub: https://github.com/hollowsolve/Match