import re
def is_valid_email(addr): return re.match(r'^\w[\w|.]*@\w+.com$', addr)
def name_of_email(addr): return re.match('(<?)([\w\s]+)(>?\s\w@\w+.\w{3})', addr).group(2)
Sign in to make a reply
阿萌QVQ
import re
def is_valid_email(addr): return re.match(r'^\w[\w|.]*@\w+.com$', addr)
import re
def name_of_email(addr): return re.match('(<?)([\w\s]+)(>?\s\w@\w+.\w{3})', addr).group(2)