python regular expression to remove the Chinese text symbol

Quote: https://blog.csdn.net/qq_38882327/article/details/89209785

import re

# Leaving only the Chinese, uppercase and lowercase letters and Arabic numerals
REG = "[^ 0-9A-Za-z \ u4e00- \ u9fa5]"
text = "Well! Then so be it!"
Print (re.sub (REG, '', text))
 

Published 25 original articles · won praise 17 · views 40000 +

Guess you like

Origin blog.csdn.net/muguangzhichen/article/details/91358219