This is the code:
import re
regex = re.compile('java')
print regex.match('/something.java')
This is the output:
None
This is the code:
import re
regex = re.compile('java')
print regex.match('/something.java')
This is the output:
None
Because python match matches from the beginning. see
python -- re.match vs. re.search
you need to use pattern .*java
if you want to use match.