given an string containing one or more email addresses,how can I go about writing a function that prints all valid email addresses of the string. consider code below which can decide if the string is exactly an email address ,meaning it can not decide if a string contains an email address. How can I develop this code, so it will check if a string contains one or more email addresses and then print them ?
import re
def check(email):
return re.match(r'[^@]+@[^@]+\.[^@]+', email) != None