let´s say I have an array of email adresses and with RE pattern I need to print only those which have ´uniba.sk´ in them.
import re
p = ['my.name@euniba.sk', 'your.name@uniba.sk', 'people@dkd.ffff.uniba.sk']
def function(p):
for i in p:
if re.match(r"\"?([-a-zA-Z0-9.`?{}]+@\w*(uniba\.sk)+)\"?", i):
print(i)
But this only gives me first or second type of mail from array. BUT the first type of email with euniba.sk is incorect so that should not be printed.
I am new in RE so I would need help, what I am doing wrong? Or how can I create the correct pattern for this?