This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gvanrossum
Recipients ezio.melotti, gvanrossum
Date 2008-10-23.04:02:18
SpamBayes Score 0.0066475
Marked as misclassified No
Message-id <>
No, re.sub()'s documentation
makes it clear that \ followed by n in the replacement string is

To insert \ followed by n you have to double the \ inside the raw string
like this:

>>> re.sub('a', r'\\n', 'abba')
Date User Action Args
2008-10-23 04:02:19gvanrossumsetrecipients: + gvanrossum, ezio.melotti
2008-10-23 04:02:19gvanrossumsetmessageid: <>
2008-10-23 04:02:18gvanrossumlinkissue4185 messages
2008-10-23 04:02:18gvanrossumcreate