re.findall()

No BS: re.findall(pattern, string) is a powerful tool that will find all matches of a particular pattern in a string. This could be used to produce a list of email addresses, IP addresses, post codes. An example would be s = ‘alice.goodall@google.com lorem ipsum neil.blompkamp@AOL.com adipiscing elit. Vestibulum jennifer@yahoo-net.com’ emails = re.findall(r'[\w_.-]+@[\w_.-]+’,s)   With BS: […]

Read more "re.findall()"