SimpleRegex / SRL-Python

Python implementation of SRL.
MIT License
78 stars 8 forks source link

First Match issue #8

Open Clara-Brandt opened 3 years ago

Clara-Brandt commented 3 years ago

For this example SRL,

(literally "a" at least 2 times first match) one of"abcd"

The error is given, " Whoops... you may have found a bug." Followed by the most recent error from a previous query, even if it doesn't make sense for the current query (for example, Unexpected statement:$ when the current query does not contain "$")

If the part after the parentheses is removed so that the line is just:

(literally "a" at least 2 times first match)

There is no error. I've found a valid way to write the original expression,

(literally "a" at least 2 times) first match one of"abcd" https://simple-regex.com/build/60d28737b233c

but this becomes invalid again as soon as a grouping is added

(literally "a" at least 2 times) first match capture(one of"abcd")

citing "Invalid parameter given for at least."