In [1]:
import re

In [2]:
s = 'aaa@xxx.com, bbb@yyy.com, ccc@zzz.net'

In [3]:
m = re.match(r'[a-z]+@[a-z]+\.com', s)
print(m)


<re.Match object; span=(0, 11), match='aaa@xxx.com'>

In [4]:
m = re.match(r'[a-z]+@[a-z]+\.net', s)
print(m)


None

In [5]:
s = 'aaa@xxx.com, bbb@yyy.com, ccc@zzz.net'

In [6]:
m = re.search(r'[a-z]+@[a-z]+\.net', s)
print(m)


<re.Match object; span=(26, 37), match='ccc@zzz.net'>

In [7]:
m = re.search(r'[a-z]+@[a-z]+\.com', s)
print(m)


<re.Match object; span=(0, 11), match='aaa@xxx.com'>

In [8]:
s = 'aaa@xxx.com'

In [9]:
m = re.fullmatch(r'[a-z]+@[a-z]+\.com', s)
print(m)


<re.Match object; span=(0, 11), match='aaa@xxx.com'>

In [10]:
s = '!!!aaa@xxx.com!!!'

In [11]:
m = re.fullmatch(r'[a-z]+@[a-z]+\.com', s)
print(m)


None

In [12]:
s = '!!!aaa@xxx.com!!!'

In [13]:
m = re.match(r'[a-z]+@[a-z]+\.com$', s)
print(m)


None