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
Bump version to 0.10.0; remove precompute option from RegexEnumerator and RegexParser; add tests for empty character class and group with alternative; optimized generation
Copy file name to clipboardExpand all lines: README.md
-10Lines changed: 0 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,16 +75,6 @@ assert '¢' in result
75
75
assert'£'in result
76
76
```
77
77
78
-
## Precomputation
79
-
80
-
For optimization purposes, the library precomputes the strings of the elements in the regex pattern when those does not repeat indefinitely. To disable this feature, in order to reduce the time of the first call to `next()`, set `precompute=False` when creating the `RegexEnumerator`.
81
-
82
-
```python
83
-
from regex_enumerator import RegexEnumerator
84
-
85
-
re = RegexEnumerator(r'a[0-9]b', precompute=False)
86
-
```
87
-
88
78
## How it works
89
79
90
80
This library works by parsing the regex pattern into a tree structure. Once parsed, it performs a breadth-first search (BFS) on the tree to generate all matching strings. This ensures it does not get stuck on unbounded quantifiers for character classes or groups.
0 commit comments