-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Description
For the lark parsing library we use the (sadly private) stdlib re._parser
library to query the minimum and maximum length of a regex:
As can be seen from the snippet, since we also support using regex
instead of re
, we need to take special care when encountering regex specific syntax, like nested sets category patterns. The only value that needs to be correct is if minimum length is 0 or greater since we depend on Regular Expressions being non-empty in a few places.
It would be nice if there was a way a query the minimum and maximum match size from a compiled regex object. The stdlib re module is lower priority since there there is at least a way to accesses this information reliably, but I am probably also going to make a request there.
Metadata
Metadata
Assignees
Labels
No labels