您现在的位置: 无忧电子商务网 >> 信息学院 >> 程序开发 >> asp.net >> 正文

30分钟正则表达式指导

作者:佚名    信息学院来源:整理    点击数:    更新时间:2008-1-30 我要参与讨论

  例子说明了。例子编号在这个表的左列中列出。

\a 报警字符 \b 通常是单词边界,但是在一个字符集合中它表示退格键 \t  制表符 34 \r 回车 \v 垂直制表符 \f 分页符 35 \n 换行符 \e ESC 36 \nnn ASCII码八进制数为nnn的字符 37 \xnn 十六进制数为nn的字符 38 \unnnn  Unicode码为nnnn的字符 39 \cN  Control N字符,例如回车(Ctrl-M)就是\cM 40 \A 字符串的开始(像^但是不依赖于多行选项) 41 \Z 字符串的结尾或者\n之前的字符串结尾(忽略多行) \z  字符串结尾(忽略多行) 42 \G 当前搜索的开始阶段 43 \p{name} 命名为name的Unicode类中的任何字符,例如\p{IsGreek} (?>exp) 贪婪子表达式,也被称为非回溯子表达式。它只匹配一次然后就不再参与回溯。 44 (?<x>-<y>exp) or (?-<y>exp) Balancing group. This is complicated but powerful. It allows named capture groups to be manipulated on a push down/pop up stack and can be used, for example, to search for matching parentheses, which is otherwise not possible with regular expressions. See the example in the project file. 45 (?im-nsx:exp) 正则表达式选项为子表达式exp 46 (?im-nsx) Change the regular expression options for the rest of the enclosing group (?(exp)yes|no) The subexpression exp is treated as a zero-width positive lookahead. If it matches at this point, the subexpression yes becomes the next match, otherwise no is used. (?(exp)yes) Same as above but with an empty no expression (?(name)yes|no) This is the same syntax as the preceding case. If name is a valid group name, the yes expression is matched if the named group had a successful match, other

上一页  [1] [2] [3] [4] [5] [6] [7] [8] 下一页

在google里搜索更多30分钟正则表达式指导

Google
Web www.51ec.org
【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
我来说两句 对此文章发表了评论
  昵 称: *必填    ·注册用户·
  评 分: 1分 2分 3分 4分 5分     严禁发表危害国家安全、政治、黄色淫秽等内容的评论,用户需对自己在使用本网站服务过程中的行为承担法律责任。本站管理员有权保留或删除评论内容,评论内容只代表机友个人观点,与本网站立场无关。  
评 论
内 容

 
评论列表 (最新 评论仅限网友观点!)

供求信息




| 设为首页 | 加入收藏 | 关于我们 | 广告服务 | 联系方式 | 友情链接 | 版权申明