summaryrefslogtreecommitdiff
path: root/patterns.py
blob: fec59213a830a9c51f566a2f9e00c47f3af4af2a (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|喵|にゃん|nya+n)',re.IGNORECASE)
re_contains_bird = re.compile(r'(鸟|鳥)',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