Question about raw string and regex

Felipe Almeida Lessa felipe.lessa at gmail.com
Fri Mar 24 02:17:07 CET 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