첨부파일 YSG_Let's Python ch_07 Exercise.py 파일 다운로드 ##1번 import re email = """[email protected] [email protected] [email protected] [email protected] [email protected]""" from re import findall, match, compile emaillist=[] for e in email.split(sep='\n'): emaillist.append(e) # pat = compile("^[a-z][0-9a-zA-Z]{3,}@[a-z][0-9a-zA-Z]{2,}[.][a-z]{2,3}([.]
[a-z]{2,3})?") # pat = compile("[a-z][0-9a-zA-Z]{3,}@[a-z][0-9a-zA-Z]{2,}[.]
[a-z]{,3}[a-z.]{,3}$") pat = compile(r""" #아이디@호스트이름.최상위도메인.최상위도메인 [a-z] #아이디 첫문자 영문소문자...
#
2번
#
특수
#
최상위도메인
#
아이디
#
숫자
#
소문자화
#
공백
#
5번
#
4번
#
3번
#
호스트이름
원문 링크 : 파이썬 챕터7 연습문제