Archived
1
0
Fork 0
This repository has been archived on 2024-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
akari-bot/modules/user/hh.py
2020-09-19 14:21:06 +08:00

27 lines
No EOL
639 B
Python

import re
def hh(w):
if len(w) > 15:
w = re.findall('..?.?.?.?.?.?.?.?.?.?.?.?.?.?', w)
w = str(w)
w = re.sub('\[', '', w)
w = re.sub('\]', '', w)
w = re.sub(',', '-\n', w)
w = re.sub('\'', '', w)
return (w)
else:
return (w)
def hh1(w):
w = '理由“' + w + ''
if len(w) > 25:
w = re.findall('..?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?', w)
w = str(w)
w = re.sub('\[', '', w)
w = re.sub('\]', '', w)
w = re.sub(',', '-\n', w)
w = re.sub('\'', '', w)
return (w)
else:
return (w)