def remove_non_english_chinese(text):
# Use a regex pattern to match any character that is not a letter or number
pattern = r'[^a-zA-Z0-9\u4e00-\u9fff]'
# Replace all non-English and non-Chinese characters with an empty string
return re.sub(pattern, '', text)
2条答案
按热度按时间iovurdzv1#
我用python编写了它,因为你没有指定任何东西。
41zrol4v2#
您似乎要删除标点符号和空格: