Skip to content

Instantly share code, notes, and snippets.

@jbranchaud
Created October 19, 2012 16:15
Show Gist options
  • Save jbranchaud/3919120 to your computer and use it in GitHub Desktop.
Save jbranchaud/3919120 to your computer and use it in GitHub Desktop.
A quick function to split up/remove the <br /> tags when a WP sourcecode example gets auto-formatted.
import os
import sys
# add the offending text to file1.txt
f = open("file1.txt", 'r')
content = f.read()
contentArray = content.split('<br />')
for item in contentArray:
print item
# then copy/paste the console output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment