Bug report
Bug description:
>>> import re
>>> pattern = re.compile(r'^\s+([^"].*)')
>>> print(pattern.match(' hello world')) # case 1
<re.Match object; span=(0, 15), match=' hello world'>
>>> print(pattern.match(' "hello world"')) # case 2
<re.Match object; span=(0, 17), match=' "hello world"'>
Why case 2 is matched?
CPython versions tested on:
3.13
Operating systems tested on:
Linux