[docs]defextract_email_name(text:str)->str:""" Extract the name part from an email string. Example: "John Doe <john.doe@email.com>" -> "John Doe" """returntext.split("<")[0].strip()
[docs]defextract_email_address(text:str)->str:""" Extract the email address part from an email string. Example: "John Doe <john.doe@email.com>" -> "john.doe@email.com" """returntext.split("<",1)[-1].split(">",1)[0].strip()