Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/book/18-Strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -801,10 +801,10 @@ the mightiest banana in the forest...with... a banana!
| 表达式 | 含义 |
| :---- | :---- |
| `.` | 任意字符 |
| `[abc]` |包含`a`、`b`或`c`的任何字符(和`a\|b\|c`作用相同)|
| `[abc]` |包含`a`、`b`或`c`的任何字符(和`a|b|c`作用相同)|
| `[^abc]` | 除`a`、`b`和`c`之外的任何字符(否定) |
| `[a-zA-Z]` | 从`a`到`z`或从`A`到`Z`的任何字符(范围) |
| `[abc[hij]]` | `a`、`b`、`c`、`h`、`i`、`j`中的任意字符(与`a\|b\|c\|h\|i\|j`作用相同)(合并) |
| `[abc[hij]]` | `a`、`b`、`c`、`h`、`i`、`j`中的任意字符(与`a|b|c|h|i|j`作用相同)(合并) |
| `[a-z&&[hij]]` | 任意`h`、`i`或`j`(交) |
| `\s` | 空白符(空格、tab、换行、换页、回车) |
| `\S` | 非空白符(`[^\s]`) |
Expand All @@ -818,7 +818,7 @@ the mightiest banana in the forest...with... a banana!
| 逻辑操作符 | 含义 |
| :----: | :---- |
| `XY` | `Y`跟在`X`后面 |
| `X\|Y` | `X`或`Y` |
| `X|Y` | `X`或`Y` |
| `(X)` | 捕获组(capturing group)。可以在表达式中用`\i`引用第i个捕获组 |

下面是不同的边界匹配符:
Expand Down