import re
# regex for finding mentions in a tweet
regex = r"(?<!RTs)@S+"
tweet = '@tony I am so over @got and @sarah is dead to me.'
# mentions = ['@tony', '@got', '@sarah']
mentions = re.findall(regex, tweet)
# A Python program to demonstrate working of findall()
import re
# A sample text string where regular expression is searched.
string = """Todays date is 27 , month is 05 and year is 2022"""
# A sample regular expression to find digits.
regex = 'd+'
match = re.findall(regex, string)
print(match)