I don\'t understand why this simple regex match does not return a match object. It returns None what am I doing wrong?
I\'m a total newby(started yesterday) and want
Because you should be passing the re.I to compile(), not match().
re.I
compile()
match()
>>> pattern = re.compile(r'^9', re.I) >>> a=pattern.match(teststring) >>> print a <_sre.SRE_Match object at 0x1140168>