safe-regex-rs
reng
safe-regex-rs | reng | |
---|---|---|
4 | 1 | |
- | 5 | |
- | - | |
- | 3.6 | |
- | over 2 years ago | |
Java | ||
- | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
safe-regex-rs
-
Contention on multi-threaded regex matching
I added the article's benchmark to the safe-regex benchmarks. I reduced the number of strings checked from 100M to 1M so the benchmark runs in a few seconds. Here are the results running on my 2018 MBP 4-core i5-8259U. You can see that regex is faster on large strings and safe-regex is faster on small strings and in heavy multi-threaded use.
-
Let's Build a Regex Engine
The matcher for "(abc)d" [2] is a more thorough example.
[0] https://gitlab.com/leonhard-llc/safe-regex-rs/-/blob/79106c0...
[1] https://gitlab.com/leonhard-llc/safe-regex-rs/-/blob/79106c0...
[2] https://gitlab.com/leonhard-llc/safe-regex-rs/-/blob/79106c0...
reng
-
Let's Build a Regex Engine
So it be, I have also build a simplistic regex engine:
- http://blog.marcinchwedczuk.pl/matching-regexes-using-backtr...
- https://github.com/marcin-chwedczuk/reng/blob/master/src/pl/...
I was learning about continuations in LISP and how you can use them to get rid of the call stack and implement pseudo-concurrency. After reading some articles I realised that the same approach can be used to implement a backtracking regex engine in just few lines of code.
I was reading about LISP, but the code is in Java. Don't judge me.
What are some alternatives?
regex - An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.
Wizium - Insanely fast crossword generator
re2 - modern regular expression syntax everywhere with a painless upgrade path [Moved to: https://github.com/SonOfLilit/kleenexp]
caniuse - Raw browser/feature support data from caniuse.com
Scala.js - Scala.js, the Scala to JavaScript compiler
zorex - Zorex: the omnipotent regex engine
rust - Empowering everyone to build reliable and efficient software.