Python3:re.complie用法
2016-04-14 14:13
357 查看
import re pattern = re.compile('[a-zA-Z]') result = pattern.findall('as3SiOPdj#@23awe') print (result)
结果:
['a', 's', 'S', 'i', 'O', 'P', 'd', 'j', 'a', 'w', 'e']
相关文章推荐
- 安装PIL,注册表不能识别Python2.7
- Selenium2 Python 自动化测试实战学习笔记(四)
- Python教程11-14
- Python报错UnicodeDecodeError: ascii codec can t deco
- Python教程8-10
- python学习笔记(excel中处理日期格式)
- Python不同版本切换
- 更新Python以及随后的nose,easy_install,pip,numpy,scipy和theano
- 第六篇——初尝Python,意犹未尽
- Python CPU,内存实时获取
- Python爬虫爬验证码实现功能详解
- Python 迭代器工具包
- 【Python数据分析】四级成绩分布 -matplotlib,xlrd 应用
- Python基础入门
- python 解释器内建函数001
- Python Pymongo中Connection()与MongoClient()差异
- python smtplib发送邮件遇到的认证问题
- python代码中指定时区获取时间方法
- Show me the code之Python练习册 Q11~12 关键词过滤
- [ller必读] LoveLive! 必备技能之 Python Pillow 自动处理截图