Created
January 27, 2020 12:51
-
-
Save seunggabi/2eaf3fa2bf9935bb489ca9b73c9f7d9b to your computer and use it in GitHub Desktop.
stringUtils.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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