Group and Capture Parts of the Match (归类和抓取匹配中某部分)
来源:互联网 发布:开淘宝用mac 编辑:程序博客网 时间:2024/06/06 14:06
需求1: 匹配yyyy-mm-dd格式的日期, 同时抓取年,月,日
\b(\d\d\d\d)-(\d\d)-(\d\d)\b
备注
1. 年放在分组1中,月放在分组2中, 日放在分组3中
2. 如果需要取消分组,可以写成\b(?:\d\d\d\d)-(?:\d\d)-(?:\d\d)\b
3. 取消分组,同时加入模式修改符,比如不区分大小写,可以写成\b(?i:\d\d\d\d)-(?i:\d\d)-(?i:\d\d)\b
4. Tcl中,可以将\b换成\y
0 0
- Group and Capture Parts of the Match (归类和抓取匹配中某部分)
- Capture and Name Parts of the Match (抓取和命名匹配中的部分)
- Replace Matches Reusing Parts of the Match (替换重新使用部分匹配的匹配)
- Determine the Position and Length of the Match (获取匹配的起始位置,终止位置,和长度)
- The Java™ Tutorials — Generics :Wildcard Capture and Helper Methods 通配符匹配和辅助方法
- 正则表达式的Match,Group,Capture类
- js控制框架中某部分刷新
- Ruby Group Parts of An Array
- C#中如何让某部分代码作为整体折叠和展开
- Insert Part of the Regex Match into the Replacement Text (将正则匹配插入替换文本中)
- Get the average socre of the student.(The exmaple of group, having and order by).求学生平均分(group, having 和 order by使用示例).
- The parts of a person's head
- Learning the parts of object by NMF
- Learning the parts of object by NMF
- Unit 2: Reading The Parts of Speech
- C#正则表达式:group和capture
- Match without adding it to the Overall match (匹配但是不把它添加到整体匹配中)
- Match at the start/End of a line (匹配行首/行尾)
- c语言字符串处理(未完)
- hibernate的N+1问题汇总 和hibernate的缓存机制
- 安卓图表引擎AChartEngine(五) - Dataset和Render参数介绍
- 字符数组的排序
- java API之Map集合遍历
- Group and Capture Parts of the Match (归类和抓取匹配中某部分)
- C语言统计单词,空格,符号
- CString——Left、Right、Find、ReverseFind
- 顺时针打印矩阵
- 递归结构中的DP
- 短消息系统1
- chrome浏览器 iframe子页面调用父页面JS函数的问题
- AR vb
- 安卓图表引擎AChartEngine(六) - 框架源码结构图