You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A port of the Rust regex library to python for super speed linear matching.
2
+
A port of the Rust regex library to python.
3
+
4
+
This package aims to provide complete coverage of the [regex](https://github.com/rust-lang/regex) crate in Rust giving you all the advantages it brings:
5
+
> An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.
6
+
7
+
Thanks to the linear time matching it allows Python-Regex to be roughly the same speed as the standard library for non-complicated or large matches while being able to cut matching times for large and complicated expressions into fractions of what they were.
8
+
9
+
## Example of where it excells
10
+
11
+
In this examplew we use this regex pattern for selecting HTML tags.
12
+
13
+
In this case when benched on a large chunk of HTML the Rust port took just `13ms` as a max value compared to Python's `116ms` value that grows almost exponentially as the text size increases.
0 commit comments