Misbehavior of group capture with OR operand

Create issue
Issue #220 resolved
Former user created an issue

Tested with regex 2016.08.27

import re, regex

print(re.match(r'\w*(ea)\w*|\w*e(?!a)\w*', 'easier').group(1))
print(regex.match(r'\w*(ea)\w*|\w*e(?!a)\w*', 'easier').group(1))

The output:

ea
None

The re behavior is the desired one.

Comments (1)

  1. Log in to comment