regex
来源:互联网 发布:梦幻西游物价软件 编辑:程序博客网 时间:2024/05/17 23:36
\b: 单词开头或者结尾位置
\B: 不是单词开头或不是单词结尾的位置
\bh1\b: find hi\bh: find word start with hh\b: find word end with h\bhi\b.*\bLucy\b: find hi然后任意个字符(不能换行)然后Lucy
^: string 开头的位置
$: string结尾的位置
0\d\d - \d\d\d\d= 0\d{2}-\d{4} 以0开头2个数-4个数 ex: 012-1234+重复1次或n次*重复0次或n次?重复0次或1次{n}重复n次{n, }重复n次或更多{n, m}重复n~m次
\b\w{6}\b: 长度为6的单词^\d{5, 12}$: 5~12位纯数字
分枝表达式
\(?0\d{2}\)?[-]?d{8}|0\d{2}[-]?\d{8}(010)-1234567801012345678(010-12345678010)-11234567....
分组(小括号指定子表达式):
(\d{1,3}\.){3}: 1~3位数然后。 这种format出现3次
0 0
- Regex
- Regex
- Regex
- Regex
- regex
- Regex
- regex
- Regex
- regex
- Regex
- regex
- Regex
- regex
- Regex
- Regex
- Regex
- regex
- Regex
- poj 2985 The k-th Largest Group (并查集x全局动态第k大)
- 一些不错的网站
- LeetCode 题解(190): Implement Queue using Stacks
- Win7系统与它的Virtualbox中安装的Ubuntu14.04共享信息的几种方法
- C中的常见库文件说明
- regex
- 再django中应用selenium做测试
- 一个93年弱鸡程序员来到深圳深入简出
- POJ 1141 解题报告
- [人月神话]读书笔记7--产品品质保障&&日常进度跟踪
- [人月神话]读书笔记8--软件产品需要的文档&&软件开发没有银弹(捷径)
- Android Api Demos登顶之路(四十)Fragment-->Layout
- 【LeetCode-面试算法经典-Java实现】【153-Find Minimum in Rotated Sorted Array(找旋转数组中的最小数字)】
- 【LeetCode-面试算法经典-Java实现】【154-Find Minimum in Rotated Sorted Array II(找旋转数组中的最小数字II)】