Discuss / Python / 作业

作业

Topic source

devil3lood

#1 Created at ... [Delete] [Delete and Lock User]
def name_of_email(addr):
    a = re.match(r'<?([a-zA-Z ]*?)>?\s?([a-zA-Z0-9.]+?)@(\w+).(\w+)', addr)
    return a.group(1) if a.group(1) else a.group(2)


  • 1

Reply