Skip to content

Instantly share code, notes, and snippets.

@sota1235
Created October 24, 2014 08:55
Show Gist options
  • Save sota1235/8a4df94160911d4bd121 to your computer and use it in GitHub Desktop.
Save sota1235/8a4df94160911d4bd121 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import os
import re
files = os.listdir('./')
for f in files:
if f == "replace.py":
continue
fp = open(f, 'r')
tmp = fp.read()
fp.close()
fp = open(f, 'w')
txt = tmp.replace('<p>', '', 1000000000).replace('</p>', '', 100000000000)
print txt
fp.write(txt)
fp.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment