Message399793
I was frustrated for hours when I couldn't figure out why this won't match:
>>> re.findall(r'(foo)?bar|cool', 'cool')
Now I know, I have to make this change: (?:foo)
But this isn't obvious.
Should it be mentioned in the docs of re.findall() to use (?:...) for non-capturing groups? |
|
Date |
User |
Action |
Args |
2021-08-17 20:59:29 | rondevous | set | recipients:
+ rondevous, rhettinger, ezio.melotti, mrabarnett, serhiy.storchaka, HaujetZhao |
2021-08-17 20:59:28 | rondevous | set | messageid: <1629233969.0.0.61155218116.issue42448@roundup.psfhosted.org> |
2021-08-17 20:59:28 | rondevous | link | issue42448 messages |
2021-08-17 20:59:28 | rondevous | create | |
|