Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1134245
  • 博文数量: 113
  • 博客积分: 2422
  • 博客等级: 大尉
  • 技术积分: 1393
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-25 17:54
文章分类
文章存档

2016年(1)

2014年(8)

2013年(7)

2012年(13)

2011年(42)

2010年(26)

2009年(6)

2008年(6)

2007年(4)

我的朋友

分类:

2011-01-30 10:17:29

php 正则表达式笔记
 
^                Start of String
$                End of string
n*               Zero or more of 'n'
n+               One or more of 'n'
n?               A possible 'n'
n{2}             Exactly two of 'n'
n{2,}            At least 2 or more of 'n'
n{2,4}           From 2 to 4 of 'n'
()               Parenthesis to group expressions
(n|a)            Either 'n' or 'a'
.                Any single character
[1-6]            A number between 1 and 6
[c-h]            A lower case character between c and h
[D-M]            An upper case character between D and M
[^a-z]           Absence of lower case a to z
[_a-zA-Z]        An underscore or any letter of the alphabet
^.{2}[a-z]{1,2}_?[0-9]*([1-6]|[a-f])[^1-9]{2}a+$
A string beginning with any two characters
Followed by either 1 or 2 lower case alphabet letters
Followed by an optional underscore
Followed by zero or more digits
Followed by either a number between 1 and 6 or a character between a and f (Lowercase)
Followed by a two characters which are not digits between 1 and 9
Followed by one or more n characters at the end of a string
 
阅读(1647) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2011-03-05 17:51:56

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com