优先权顺序
返回目录
在构造正则表达式之后,就可以象数学表达式一样来求值,也就是说,可以从左至右并按照一个优先权顺序来求值。
下表从最高优先级到最低优先级列出各种正则表达式操作符的优先权顺序:
| 操作符 |
描述 |
| \ |
转义符 |
| (), (?:), (?=), [] |
圆括号和方括号 |
| *, +, ?, {n}, {n,}, {n,m} |
限定符 |
| ^, $, \anymetacharacter |
位置和顺序 |
| | |
“或”操作 |
Random Posts
This entry was posted
on 星期三, 12月 13th, 2006 at 5:18 pm and is filed under 未分类.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.