Regex is dead. We replaced it
matchlang.com
matchlang.com
Dead? Replaced?... Your toy is cute, but it's more suited as a regex generator, or perhaps parser/"explainer" (but we already have several well-known projects there) than a standalone tool.
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
If you write in the title "Regex is dead" people will get skeptical and ask for proofs.
How does yours compare to regexp on performance across many inputs?
Regexp is incredibly fast, I doubt yours comes anywhere close
and then there's the kicker, Ai are really good at crafting regexp, better than writing code to replace it, that's for sure
---
looks like the comment I am replying to has changed the link, it was this one: https://matchlang.com/docs/api/performance
Note to OP, use standard regexp benchmarks
[1] https://github.com/intel/hyperscan/tree/master
That could be a fun comparison. As someone mentioned, regular expressions are extremely fast, and have been benchmarked forever.