0

Why doesn't this

re.search(r"\w??at", "cat")

match only "at"? Given the ? quantifier is set to lazy?

Actual result:

<re.Match object; span=(0, 3), match='cat'>

Expected result:

<re.Match object; span=(1, 3), match='at'>
johk95
  • 873
  • 10
  • 28

0 Answers0