-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
fsm = interegular.parse_pattern("(not(?=\s)|not(?=\()|-)").to_fsm()
assert fsm .accepts('-') == True
assert fsm .accepts('--') == False
Both of the above fail. I expect the first to succeed and the second to fail, because the final state for the second should end at the first '-'.
In contrast:
re.match('(not(?=\s)|not(?=\()|-)', '-')
re.match('(not(?=\s)|not(?=\()|-)', '--')
both of the above succeed (but the span for the second one is still (0, 1)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels