GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing raw.githubusercontent.com — raw.githubusercontent.com # 边界匹配符和组
将上面几个点,就用了很大的篇幅了,现在介绍一些边界匹配符和组的概念。
一般的边界匹配符有以下几个:
| 语法 | 描述 |
| ---- | ------------------------------------------------ |
| ^ | 匹配字符串开头(在有多行的情况中匹配每行的开头) |
| $ | 匹配字符串的末尾(在有多行的情况中匹配每行的末尾) |
| \A | 仅匹配字符串开头 |
| \Z | 仅匹配字符串末尾 |
| \b | 匹配 \w 和 \W 之间 |
| \B | [^\b] |
分组,被括号括起来的表达式就是分组。分组表达式 `(...)` 其实就是把这部分字符作为一个整体,当然,可以有多分组的情况,每遇到一个分组,编号就会加 1 ,而且分组后面也是可以加数量词的。
此处本应有例子,考虑到篇幅问题,就不贴了
|
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |