On Jun 24, 12:11 pm, humn <xelothat...@gmail.com> wrote:
> but this doesn't:
>
> if '\title' in line:
>         line = line.replace('\title{', '[size=150][b]')
>         line = line.replace('}', '[/b][/size]')

\t is an escaped <tab> character. so, '\title' will look for
'<tab>itle'

Two ways to fix this:

1. use r'\title'

2. use '\\title'

\c does not represent a known escape sequence so it remains two
characters.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to