HackerTrans
トップ新着トレンドコメント過去質問紹介求人

hollowsolve

no profile record

投稿

Regex is dead. We replaced it

matchlang.com
9 ポイント·投稿者 hollowsolve·5 か月前·9 コメント

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

matchlang.com
3 ポイント·投稿者 hollowsolve·5 か月前·0 コメント

コメント

hollowsolve
·5 か月前·議論
elaborate?
hollowsolve
·5 か月前·議論
Performance breakdown: https://matchlang.com/docs/api/benchmarks
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 domain

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

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

Match 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 modules

Website: https://matchlang.com

Performance: https://matchlang.com/docs/api/performance

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