I did this: a = 'a b' if match(r'\s',a): print 'error' and it didn't match. a = ' b' and it did match. Documentation seems to imply that \s matches whitespace anywhere in the string, what gives? -- - Andrei