Thanks for teaching me about the __getitem__ method of the Match class. I always do .group(1) before.
Abdulla Sent from my iPhone > On 29 Mar 2022, at 12:02 PM, Serhiy Storchaka <storch...@gmail.com> wrote: > > re.search(r'fruit:(.*?)\n', sample)[1] _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/PM3DNWEP4NFXT25GPHGP4I4J6YFKQNVZ/ Code of Conduct: http://python.org/psf/codeofconduct/