【Python小随笔】输入字符串,检测出中文
作者:互联网
def fine_word(text_raw): """ :param text_raw: 文本 :return: 返回中文字符串 """ text = "" regStr = ".*?([\u4E00-\u9FA5]+).*?" re_text = re.findall(regStr, text_raw) if re_text: for res in re_text: text = text + res return text
标签:return,re,Python,text,raw,res,字符串,regStr,随笔 来源: https://www.cnblogs.com/wanghong1994/p/16143211.html