Rules Based Matcher with OP "!" and "?" #9692
-
How to reproduce the behaviourI think this is a bug, but would be interested in hearing feedback.
My expectations are that the "match 0 times" token with OP "!" would cause the first example to produce no matches. I also think maybe this is a bug b/c indexing into the doc with start = match[1] = 1 and end=match[2] = 3 raises an IndexError. EDIT: Thanks for the great library! Your Environment
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Yes, it's the same as array slice notation, so |
Beta Was this translation helpful? Give feedback.
-
Also, to clarify:
This is not correct, the output is as expected. You can remove |
Beta Was this translation helpful? Give feedback.
Also, to clarify:
This is not correct, the output is as expected. You can remove
token1
from the text and it will still work, becausetoken2
is nottoken1
(matches ! rule),token2
is present zero times after that (matches ? rule), andtoken3
is next (matches final rule).