thanks - that's the trick.

On 8/17/06, Tim Chase <[EMAIL PROTECTED]> wrote:
> Looks like you need to be using "raw" strings for your
> replacements as well:
>
> s = re.sub(r'([A-Z]+)([A-Z][a-z])', r"\1_\2", s)
> s = re.sub(r'([a-z\d])([A-Z])', r"\1_\2", s)
>
> This should allow the backslashes to be parsed as backslashes,
> not as escape-sequences (which in this case are likely getting
> interpreted as octal numbers)
>
> -tkc
>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to