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 <[email protected]> wrote:
> 
> re.search(r'fruit:(.*?)\n', sample)[1]
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/PM3DNWEP4NFXT25GPHGP4I4J6YFKQNVZ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to