0

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

enter image description here

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.

kellymandem
  • 1,509
  • 2
  • 15
  • 23

0 Answers0