Skip to content

Instantly share code, notes, and snippets.

@seunggabi
Created January 27, 2020 12:51
Show Gist options
  • Save seunggabi/2eaf3fa2bf9935bb489ca9b73c9f7d9b to your computer and use it in GitHub Desktop.
Save seunggabi/2eaf3fa2bf9935bb489ca9b73c9f7d9b to your computer and use it in GitHub Desktop.
stringUtils.py
import re
class StringUtils:
@staticmethod
def removeTags(contents):
contents = re.sub("<\/?[\w\?\"\.\=\-\ ]*>", "", contents)
contents = re.sub("(\\n\\t*\\n)+", "\\n", contents)
return contents
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment