import restring = 'c:\test.doc'if re.match(r":\\[0-9a-z]", string): ##r":\\[0-9a-z]" should match ':\t' print 'true'else: print 'false'