2019年1月22日
摘要: import re ''' \w : 匹配字母数字及下划线 \W :匹配非字母数字下划线 ''' print(re.findall('\w','ab 12\+- *&_')) #['a', 'b', '1', '2', '_'] print(re.findall('\W','ab 12\+- *&_')) #[' ', '\\', '+', 阅读全文
posted @ 2019-01-22 11:43 Jolinhe 阅读(255) 评论(0) 推荐(0) 编辑