Question about raw string and regex

Felipe Almeida Lessa felipe.lessa at gmail.com
Thu Mar 23 20:17:07 EST 2006


Em Qui, 2006-03-23 às 17:11 -0800, jlowery at blarg.net escreveu:
> Since the classexpr isn't a raw string (not r prefix), doesn't the \t
> get converted to a tab character before it gets to the regex compiler?

>>> print '^\([ \t]*class +[a-zA-Z0-9_]+\) *( *) *\(\(=.*\)?\):'
^\([    ]*class +[a-zA-Z0-9_]+\) *( *) *\(\(=.*\)?\):

Yes... maybe that's the intention?

-- 
Felipe.




More information about the Python-list mailing list