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
{{ message }}
This repository was archived by the owner on Jan 30, 2024. It is now read-only.
A Python library for parsing, compiling, and executing regular expressions.
All searches execute in linear time with respect to the size of the regular
expression and search text.
Initial work inspired by Thompson's NFA paper.
APIs inspired by RE2 and Python's re module.
Implementation is my own and it's not influenced by any existing solution.
Be aware!
This is nothing more than an experiment for researching purposes.
Status
Matcher
Basic operators: *, ?, + and |
Capturing groups
Symbols escaping
Shorthands: \w, \d, \s, \W, \D, \S
Sets [...] (+ ranges and shorthands)
Repetition ranges {n, m}
non-capturing groups
Greedy and non-greedy match
^ and $ symbols
\b word boundary
Match any (dot)
Sets complement
Lookahead assertion (?=...) and (?!...) (limited to a single char)
Assertions \A, \z, \B
Named capturing groups
search
full_match
Flags
User friendly compiling errors
... ?
Compatibility
Python +3.5
Install
$ pip install regexy
Usage
Notice regexy returns all capturing groups specified within a repeated sub-expression