blob: a91064f1a993d607f795310acd5edccbd7cbfb3f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import re
#### RE PATTERNS ####
re_contains_meow = re.compile(r'(me+o+w|喵)',re.IGNORECASE)
re_contains_bird = re.compile(r'(鸟|bird)',re.IGNORECASE)
#### MISC STRING PRESETS ####
cat_sounds = ["Meow!", "Mrrrow!", "Purr...", "Meee-OW!", "Mreoww!", "Nya~", "Mew?", "Rowr?", "Prrrr...", "Maow-maow!"]
bird_sounds = ["鸟!", "chirp!"]
#### PARSE STATUS HTMLs....
RE_HTML_CLEANR = re.compile('<.*?>')
def cleanhtml(raw_html):
cleantext = re.sub(RE_HTML_CLEANR, '', raw_html)
return cleantext
|