2 ms·
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.-]+
by hollowsolve 8mo ago
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 https://matchlang.com
Performance: https://matchlang.com/docs/api/performance https://matchlang.com/docs/api/performance
GitHub: https://github.com/hollowsolve/Match https://github.com/hollowsolve/Match
- gus_massa 8mo agoThe preferred style here for the titles is more dry, something like "Matchlang: A pattern matching language that replaces regular expressions. Full parse trees, no ReDoS" or a shorter version like "Matchlang: A replacement for regular expressions. Full parse trees, no ReDoS". If you write in the title "Regex is dead" people will get skeptical and ask for proofs.