摘要: 1.有个坑 re.sub('[^\w]', ' ', 'hello world, get rid of comma') --> [^\w] 非字符的意思 [^abc] 匹配除了a,b,c之外的字符 import re text_string = re.sub(r'([^\s\w]|_|[0-9])+ 阅读全文
posted @ 2021-01-29 23:03 littlevigra 阅读(777) 评论(0) 推荐(0)