testre

 avatar
huuductu
python
2 years ago
199 B
1
Indexable
import re

fileName = input()
    
myre=re.compile(r"^(\w+)(\.\w+)*@(\w+)((\.\w+)+)$")
file=open(fileName, 'r')

for line in file:
    t = myre.findall(line)
    if t:
        print(line)