Skip to content

Instantly share code, notes, and snippets.

@offby1
Created June 9, 2015 01:51
Show Gist options
  • Select an option

  • Save offby1/d7a981ae8a9e2edff837 to your computer and use it in GitHub Desktop.

Select an option

Save offby1/d7a981ae8a9e2edff837 to your computer and use it in GitHub Desktop.
>>> re.sub(r"<\\nl>","\n", "what <\\nl> is it?")
'what \n is it?'
>>> re.sub("<\\\\nl>","\n", "what <\\nl> is it?")
'what \n is it?'
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment