关于作者

Discuss / Python / Task

迷茫的老九

#1 Created at ...

Task1

import re
test=input('please enter:')
re_mode=re.compile(r'[0-9a-zA-Z._]*@\w+.com')
if re_mode.match(test):
    print('ok!')
else:
    print('failed!')

Task2

import re
Email=input('please enter the Email:')
re_mode=re.compile(r'<([a-zA-Z]* [a-zA-Z]*)> [\w.]*@\w+.[a-z]*')
we=re_mode.match(Email)
if we:
    print(we.groups())
else:
    print('failed!')

  • 1

Reply

WARNING: You are using an old browser that does not support HTML5. Please choose a modern browser (Chrome / Microsoft Edge / Firefox / Sarafi) to get a good experience.