Rondevous <rondevu.mis...@protonmail.com> added the comment:

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?

----------
nosy: +rondevous

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42448>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to