Control characters used in above samples
|
Character |
Meaning |
|
^ |
Beginning of line |
|
$ |
End of line |
|
\s |
Whitespace (a tab or space) |
|
* |
Zero or more of the preceding character |
|
? |
Preceding character is optional |
|
| |
Alternative expression |
|
( ) |
Subexpressions |
|
\1 |
Back reference to 1st subexpression |
本文介绍了一些基本的正则表达式字符及其含义,例如开始行 (^),结束行 ($), 白空格 (s),任意数量的前驱字符 (*),可选的前驱字符 (?),替代表达式 (|) 以及子表达式 () 和对第一个子表达式的引用 (1)。
1347

被折叠的 条评论
为什么被折叠?



