>>> p.sub('','a\nbc') 'abc' >>> p.sub('','%s') % "a\nbc" 'a\nbc' is it anyone got some idea why it happen?