Am trying to find a certain keyword in url string like so
import re
test = re.match(r'coo', 'https://example.com/coo-dropped-today/', flags=re.IGNORECASE)
but when test my test
variable using type(test)
it presents me with <class 'NoneType'>
.
But when i run the same string through regexpal i seem to find a match as evidenced from the screenshot below
This is not a complex regex expression so am guessing regex parsers or engines don't matter.
Why i am unable to find a match in my python code? Thank you.