Python 正则表达式
2015-02-09 18:11
239 查看
group()函数和groups()函数的区别。
一般,m.group(N) 第N组括号匹返回配的字符。而m.group() == m.group(0) == 所有匹配的字符,与括号无关,这个是API规定的。
m.groups() 返回所有括号匹配的字符,以tuple格式。
m.groups() == (m.group(0), m.group(1), ...)
相关文章推荐
- Python正则表达式的用法(2. 替换;3.拆分)
- 转载:Python正则表达式的用法(1. 匹配)
- 比较详细Python正则表达式操作指南(re使用)
- python 正则表达式 概述及常用字符
- Python 正则表达式操作指南
- python正则表达式操作指南[转载]
- 在python 中使用正则表达式
- python正则表达式分析新浪网天气预报,通过pyfetion发送短信的代码
- 比较详细Python正则表达式操作指南(re使用)
- Python正则表达式(二)
- Python天天美味(15) - Python正则表达式操作指南(re使用)(转)
- 正则表达式在python中的应用
- Python用re(正则表达式)模块过滤Telnet字体颜色
- Python正则表达式的几种匹配用法
- c++正则表达式,python
- python中正则表达式与re 模块
- python中的一些正则表达式的含义
- Python正则表达式(一)
- Python正则表达式(三)
- Python正则表达式操作指南