Skip to content

Commit

Permalink
Regex and Parsing!
Browse files Browse the repository at this point in the history
  • Loading branch information
snehalmastud authored Feb 23, 2020
1 parent bac8ef5 commit dea747c
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import re

n=input()
for i in range(n):
line=raw_input()
name,email=line.split(' ')
pattern="<[a-z][a-zA-Z0-9\-\.\_]+@[a-zA-Z]+\.[a-zA-Z]{1,3}>"
if bool(re.match(pattern,email)):
print name,email

0 comments on commit dea747c

Please sign in to comment.