'''
python Using regular expressions , You can also start with Compile a regular , then , With this regular Go to match ,search , findall
'''
text = "text my * IOD soela MYVso its Tye We tokyo hot "
pattern = r'my'
regex = re.compile(pattern, flags=re.IGNORECASE)
regex.search(text)
print(regex.search(text))
regex.search(text).group()
regex.findall(text)
I usually use this directly character string . such as :
text = "text my100 * IOD soela MYVso its Tye We tokyo hot "
pattern = r'my\d+'
regex = re.compile(pattern)
regex.findall(text)
re.findall(pattern, text)