Python Extract Paints из строки
import re
line = "should we use regex more often? let me know at 321dsasdsa@dasdsa.com.lol"
match = re.search(r'[\w.+-]+@[\w-]+\.[\w.-]+', line)
print(match.group(0))
# '321dsasdsa@dasdsa.com.lol'
# or for multiple adresses
line = "should we use regex more often? let me know at 321dsasdsa@dasdsa.com.lol or dadaads@dsdds.com"
match = re.findall(r'[\w.+-]+@[\w-]+\.[\w.-]+', line)
print(match)
# ['321dsasdsa@dasdsa.com.lol', 'dadaads@dsdds.com']
haidook.dev