[issue32319] re fullmatch error with non greedy modifier

2017-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, this is not how fullmatch() works. Otherwise there wouldn't be need to add it into the stdlib. You could just check end() of the result. fullmatch() acts like match() with added \Z. But if the pattern contains multiple

[issue32319] re fullmatch error with non greedy modifier

2017-12-13 Thread Daniel Hrisca
New submission from Daniel Hrisca : Consider this code snippet: from re import match, fullmatch pattern = '".+?"' string = '"hello" "again"' print(match(pattern, string)) print(fullmatch(pattern, string)) Which prints: <_sre.SRE_Match object; span=(0, 7),