Discuss / Python / 练习

练习

Topic source

第一题

def is_valid_email(addr):
    return re.match(r'[\w_.]+@\w+.\w', addr) != None

第二天,没做判断是否是邮箱地址

def name_of_email(addr):
    return re.match(r'<*([\s\w]+|[\w_]+)>*', addr).group(1)

  • 1

Reply