编程小贴士

给你的编程提供小点子


正则表达式30分钟入门教程

本文目标

30分钟内让你明白正则表达式是什么,并对它有一些基本的了解,让你可以在自己的程序或网页里使用它。

如何使用本教程

最重要的是——请给我30分钟, 如果你没有使用正则表达式的经验,请不要试图在30内入门——除非你是超人 :)

别被下面那些复杂的表达式吓倒,只要跟着我一步一步来,你会发现正则表达式其实并没有你 想像中的那么困难。当然,如果你看完了这篇教程之后,发现自己明白了很多,却又几乎什么都记不得,那也是很正常的——我认为,没接触过正则表达式的人在看 完这篇教程后,能把提到过的语法记住80%以上的可能性为零。这里只是让你明白基本的原理,以后你还需要多练习,多使用,才能熟练掌握正则表达式。

除了作为入门教程之外,本文还试图成为可以在日常工作中使用的正则表达式语法参考手册。就作者本人的经历来说,这个目标还是完成得不错的 ——你看,我自己也没能把所有的东西记下来,不是吗?

清除格式文本格式约定:专业术语元字符/语法格式正则表达式正则表达式中的一部分(用于分析)对其进行匹配的源字符串对正则表达式或其中一部分的说明

隐藏边注本文右边有一些注释,主要是用来提供 一些相关信息,或者给没有程序员背景的读者解释一些基本概念,通常可以忽略。

正则表达式到底是什么东西?

字符是计算机软件处理文字时最基本的单位,可能是字母,数字, 标点符号,空格,换行符,汉字等等。字符串是0个或更多个字符的序列。文本也就是文字,字符串。说某个字符串匹配某个正则表达 式,通常是指这个字符串里有一部分(或几部分分别)能满足表达式给出的条件。

在编写处理字符串的程序或网页时,经常会有查找符合某些复杂规则的字符串的需要。正则表达式就 是用于描述这些规则的工具。换句话说,正则表达式就是记录文本规则的代码。

很可能你使用过Windows/Dos下用于文件查找的通配符(wildcard), 也就是*和?。如果你想查找某个目录下的所 有的Word文档的话,你会搜索*.doc。在这里,*会被解释成任意的字符串。和通配符类似,正则表达式也是用来进行文本匹配的工具,只不过比起通配 符,它能更精 确地描述你的需求——当然,代价就是更复杂——比如你可以编写一个正则表达式,用来查找所有以0开头,后面跟着 2-3个数字,然后是一个连字号“-”,最后是7或8位数字的字符串(像010-12345678或0376-7654321)。

入门

学习正则表达式的最好方法是从例子开始,理解例子之后再自己对例子进行修改,实验。下面给出了不少简单的例子,并对它们作了详细的说明。

假设你在一篇英文小说里查找hi,你可以使用正则表达式hi。

这几乎是最简单的正则表达式了,它可以精确匹配这样的字符串:由两个字符组成,前一个字符是h,后 一个是i。通常,处理正则表达式的工具会提供一个忽略大小写的选项,如果选中了这个选项,它可以匹配hi,HI,Hi,hI这四种情况中的任意一种。

不幸的是,很多单词里包含hi这两个连续的字符,比如him,history,high等等。用hi来查找的话,这里边的hi也会被找出来。如果要精确地查找hi这个单词的 话,我们应该使用bhib。

b是正则表达式规定的一个特殊代码(好吧,某些人叫它元字符,metacharacter),代表着单词的开头或结尾,也就 是单词的分界处。虽然通常英文的单词是由空格,标点符号或者换行来分隔的,但是b并 不匹配这些单词分隔字符中的任何一个,它只匹配一个位置

如果需要更精确的说法,b匹配这样的位置:它的前一个字符 和后一个字符不全是(一个是,一个不是或不存在)w。

假如你要找的是hi后面不远处跟着一个Lucy,你应该用bhib.*bLucyb。

这里,.是另一个元字符,匹配除了换行符以 外的任意字符。*同样是元字符,不过它代表的不是字符,也不是位置,而是数量——它 指定*前边的内容可以连续重复使用任意次以使整个表达式得到匹配。因此,.*连在一起就意味着任意数量的不包含换行的字符。现在bhib.*bLucyb 的意思就很明显了:先是一个单词 hi,然后是任意个任意字符(但不能是换行),最后是Lucy这个单词。

换行符就是’n’,ASCII编码为10(十六进制0x0A)的字符。

如果同时使用其它元字符,我们就能构造出功能更强大的正则表达式。比如下面这个例子:

0dd-dddddddd匹配这样的字符串:以0开头,然后是两个数字,然后是一个连字号“-”,最后是8个数字(也就是中国的电话号码。当然,这个例子只 能匹配区号为3位的情形)。

这里的d是个新的元字符,匹配一位数字 (0,或1,或2,或……)。-不是元字符,只匹配它本身——连字符(或者减号,或 者中横线,或者随你怎么称呼它)。

为了避免那么多烦人的重复,我们也可以这样写这个表达式:0d{2}-d{8}。 这里d后面的{2}({8})的意思是前面d必须连续重复匹配2次(8次)。

测试正则表达式

 

其它可用的测试工具:

  • RegexBuddy
  • Javascript正则表达式在线测试工具

 

如果你不觉得正则表达式很难读写的话,要么你是一个天才,要么,你不是地球人。正则表达式的语法很令人头疼,即使对经常使用它的人来说也是 如此。由于难于读写,容易出错,所以找一种工具对正则表达式进行测试是很有必要的。

不同的环境下正则表达式的一些细节是不相同的,本教程介绍的是微软 .Net Framework 2.0下正则表达式的行为,所以,我向你介绍一个.Net下的工具Regex Tester。首先你确保已经安装了.Net Framework 2.0,然后下载Regex Tester。这是个绿色软件,下载完 后打开压缩包,直接运行RegexTester.exe就可以了。

下面是Regex Tester运行时的截图:

tips1000_2015-12-27_06-58-38

元字符

现在你已经知道几个很有用的元字符了,如b,.,*,还有d. 正则表达式里还有更多的元字符,比如s匹配任意的空白 符,包括空格,制表符(Tab),换行符,中文全角空格等。w匹配字母或数字或下划线或汉字等。

对中文/汉字的特殊处理是由.Net提供的正则表达式引擎支持的,其它环境下的具体情况请查看 相关文档。

下面来看看更多的例子:

baw*b匹配以字母a开头的单词——先是某个单词开始处(b),然后是字 母a,然后是任意数量的字母或数字(w*), 最后是单词结束处(b)。

好吧,现在我们说说正则表达式里的单词是什么意思吧:就是不少于一个的连续的w。不错,这与学习英文时要背的成千上万个同名的东西的确关系不大 :)

d+匹配1个或更多连续的数字。 这里的+是和*类似的元字符,不同的是*匹配重复任意次(可能是0次),而+则匹配重复1次或更多次。

bw{6}b匹配刚好6个字符的 单词。

表1.常用的元字符
代码 说明
. 匹配除换行符以外的任意字符
w 匹配字母或数字或下划线或汉字
s 匹配任意的空白符
d 匹配数字
b 匹配单词的开始或结束
^ 匹配字符串的开始
$ 匹配字符串的结束

正则表达式引擎通常会提供一个“测试指定的字符串是否匹配一个正则表达式”的方法,如JavaScript里的 RegExp.test()方法或.NET里的Regex.IsMatch()方法。这里的匹配是指是字符串里有没有符合表达式规则的部分。如果不使用^ 和$的话,对于d{5,12}而言,使用这样的方法就只能保证字符串里包含5到 12连续位数字,而不是整个字符串就是5到12位数字。

元字符^(和数字6在同一个键位上的符号)和$都 匹配一个位置,这和b有点类似。^匹配你 要用来查找的字符串的开头,$匹配结尾。这两个代码在验证输入的内容时非常有用,比如一个网站如果 要求你填写的QQ号必须为5位到12位数字时,可以使用:^d{5,12}$。

这里的{5,12}和前面介绍过的{2}是 类似的,只不过{2}匹配只能不多不少重复2次,{5,12}则是重复的次数不能少于5次,不能多于12次, 否则都不匹配。

因为使用了^和$,所以输入 的整个字符串都要用来和d{5,12}来匹配,也就是说整个输入必须是5到12个数字,因此如果输入的QQ号能匹配这个正则表达式的话,那就符合要求了。

和忽略大小写的选项类似,有些正则表达式处理工具还有一个处理多行的选项。如果选中了这个选项,^和$的意义就变成了匹配行的开始处和结束处。

字符转义

如果你想查找元字符本身的话,比如你查找.,或者*,就出现了问题:你没办法指定它们,因为它们会被解释成别的意思。这时你就得使用来取消这些字符的特殊意义。因此,你应该使用.和*。当然,要查找本身,你也得用.

例如:deerchao.net匹配deerchao.net,C:Windows匹配C:Windows。

重复

你已经看过了前面的*,+,{2},{5,12}这几个匹配重复的方式了。下面是 正则表达式中所有的限定符(指定数量的代码,例如*,{5,12}等):

表2.常用的限定符
代码/语法 说明
* 重复零次或更多次
+ 重复一次或更多次
? 重复零次或一次
{n} 重复n次
{n,} 重复n次或更多次
{n,m} 重复n到m次

下面是一些使用重复的例子:

Windowsd+匹配Windows 后面跟1个或更多数字

^w+匹配一行的第一个单词(或整个字 符串的第一个单词,具体匹配哪个意思得看选项设置)

字符类

要想查找数字,字母或数字,空白是很简单的,因为已经有了对应这些字符集合的元字符,但是如果你想匹配没有预定义元字符的字符集合(比如元 音字母a,e,i,o,u),应该怎么办?

很简单,你只需要在方括号里列出它们就行了,像[aeiou]就匹配任何一个英文元音字母,[.?!]匹配标点符号(.或?或!)。

我们也可以轻松地指定一个字符范围,像[0-9]代 表的含意与d就是完全一致的:一位数字; 同理[a-z0-9A-Z_]也完全等同于w(如 果只考虑英文的话)。

下面是一个更复杂的表达式:(?0d{2}[) -]?d{8}。

“(”和“)”也是元字符,后面的分组节里会提 到,所以在这里需要使用转义。

这个表达式可以匹配几种格式的电话号码,像(010)88886666,或022-22334455, 或02912345678等。我们对它进行一些分析吧:首先是一个转义字符(,它能出现0次或1次(?),然后是一个0,后面跟着2个数字(d{2}), 然后是)或-或空格中 的一个,它出现1次或不出现(?),最后是8个数字(d{8})。

分枝条件

不幸的是,刚才那个表达式也能匹配010)12345678或(022-87654321这样的“不正确”的格式。要解决这个问题,我们需要用到分 枝条件。正则表达式里的分枝条件指的是有几种规则,如 果满足其中任意一种规则都应该当成匹配,具体方法是用|把不同的规则分隔开。听不明白?没关系,看 例子:

0d{2}-d{8}|0d{3}-d{7}这个表达式能匹配两种以连字号分隔的电话号码:一种是三位区号,8位本地号(如010-12345678),一种是4位区号,7位本地号 (0376-2233445)。

(0d{2})[- ]?d{8}|0d{2}[- ]?d{8}这 个表达式匹配3位区号的电话号码,其中区号可以用小括号括起来,也可以不用,区号与本地号间可以用连字号或空格间 隔,也可以没有间隔。你可以试试用分枝条件把这个表达式扩展成也支持4位区号的。

d{5}-d{4}|d{5}这个表达式用于匹配美国的邮政编码。美国邮编 的规则是5位数字,或者用连字号间隔的9位数字。之所以要给出这个例子是因为它能说明一个问题:使用分枝条件时,要注意各个条件的顺序。 如果你把它改成d{5}|d{5}-d{4}的话,那么就只会匹配5位的邮编(以及9位邮 编的前5位)。原因是匹配分枝条件时,将会从左到右地测试每个条件,如果满足了某个分枝的话,就不会去再管其它的条件了。

分组

我们已经提到了怎么重复单个字符(直接在字符后面加上限定符就行了);但如果想要重复多个字符又该怎么办?你可以用小括号来指定子表达式(也叫做分组),然后你就可以指定这个子表达 式的重复次数了,你也可以对子表达式进行其它一些操作(后面会有介绍)。

(d{1,3}.){3}d{1,3}是一个简单的IP地址匹配表达式。要理解这个表达式,请按下列顺序分析它:d{1,3}匹 配1到3位的数字,(d{1,3}.){3}匹 配三位数字加上一个英文句号(这个整体也就是这个分组)重 复3次,最后再加上一个一到三位的数字(d{1,3})。

IP地址中每个数字都不能大于255,大家千万不要被《24》第三季的编剧给忽悠了……

不幸的是,它也将匹配256.300.888.999这种不可能存在的IP地 址。如果能使用算术比较的话,或许能简单地解决这个问题,但是正则表达式中并不提供关于数学的任何功能,所以只能使用冗长的分组,选择,字符类来描述一个 正确的IP地址:((2[0-4]d|25[0-5]|[01]?dd?).){3}(2[0-4]d|25[0-5]|[01]?dd?)。

理解这个表达式的关键是理解2[0-4]d|25[0-5]|[01]?dd?, 这里我就不细说了,你自己应该能分析得出来它的意义。

反义

有时需要查找不属于某个能简单定义的字符类的字符。比如想查找除了数字以外,其它任意字符都行的情况,这时需要用到反义:

表3.常用的反义代码
代码/语法 说明
W 匹配任意不是字母,数字,下划线,汉字的字符
S 匹配任意不是空白符的字符
D 匹配任意非数字的字符
B 匹配不是单词开头或结束的位置
[^x] 匹配除了x以外的任意字符
[^aeiou] 匹配除了aeiou这几个字母以外的任意字符

例子:S+匹配不包含空白符的字符串。

<a[^>]+>匹配用 尖括号括起来的以a开头的字符串。

后向引用

使用小括号指定一个子表达式后,匹配这个子表达式的文本(也就是此分组捕获的内容)可以在表达式或其它 程序中作进一步的处理。默认情况下,每个分组会自动拥有一个组号,规则是:从左向右,以分组的左括 号为标志,第一个出现的分组的组号为1,第二个为2,以此类推。

 

呃……其实,组号分配还不像我刚说得那么简单:

  • 分组0对应整个正则表达式
  • 实际上组号分配过程是要从左向右扫描两遍的:第一遍只给未命名组分配,第二遍只给命名组分配--因此所有命名组的组号都大于未命名的组 号
  • 你可以使用(?:exp)这样的语法来剥夺一个分组对组号分配的参与权.

 

后向引用用于重复搜索前面某个分组匹配的文本。例如,1代表分组1匹配的文本。难以理解?请看示例:

b(w+)bs+1b可以用来匹配重复的单词,像go go, 或者kitty kitty。这个表达式首先是一个单词, 也就是单词开始处和结束处之间的多于一个的字母或数字(b(w+)b), 这个单词会被捕获到编号为1的分组中,然后是1个或几个空白符(s+),最后是分组1中捕获的内容(也就是前面匹配的那个单词)(1)。

你也可以自己指定子表达式的组名。要指定一个子表达式的组名,请使用这样的语法:(?<Word>w+)(或者把尖括号换成’也 行:(?’Word’w+)),这样就把w+的 组名指定为Word了。要反向引用这个分组捕获的 内容,你可以使用k<Word>,所以上一个例子也可以写成这 样:b(?<Word>w+)bs+k<Word>b。

使用小括号的时候,还有很多特定用途的语法。下面列出了最常用的一些:

表4.常用分组语法
分类 代码/语法 说明
捕获 (exp) 匹配exp,并捕获文本到自动命名的组里
(?<name>exp) 匹配exp,并捕获文本到名称为name的组里,也可以写成 (?’name’exp)
(?:exp) 匹配exp,不捕获匹配的文本,也不给此分组分配组号
零宽断言 (?=exp) 匹配exp前面的位置
(?<=exp) 匹配exp后面的位置
(?!exp) 匹配后面跟的不是exp的位置
(?<!exp) 匹配前面不是exp的位置
注释 (?#comment) 这种类型的分组不对正则表达式的处理产生任何影响,用于提供注释让人阅 读

我们已经讨论了前两种语法。第三个(?:exp)不会改变正则表达式的处理方式,只 是这样的组匹配的内容不会像前两种那样被捕获到某个组里面,也不会拥有组号。“我为什么会想要这样 做?”——好问题,你觉得为什么呢?

零宽断言

地球人,是不是觉得这些术语名称太复杂,太难记了?我也有同感。知道有这么一种东西就行了,它叫什么,随它去 吧!人若无名,便可专心练剑;物若无名,便可随意取舍……

接下来的四个用于查找在某些内容(但并不包括这些内容)之前或之后的东西,也就是说它们像b,^,$那样用于指定一个位置,这个位置应该满足一定的 条件(即断言),因此它们也被称为零宽断言。最好还是拿例子来说明吧:

断言用来声明一个应该为真的事实。正则表达式中只有当断言为真时才会继续进行匹配。

(?=exp)也叫零宽度正预测先行断言, 它断言自身出现的位置的后面能匹配表达式exp。比如bw+(?=ingb), 匹配以ing结尾的单词的前面部分(除了ing以外的部分),如查找I’m singing while you’re dancing.时,它会匹配sing和danc。

(?<=exp)也叫零宽度正回顾后 发断言,它断言自身出现的位置的前面能匹配表达式exp。比如(?<=bre)w+b会匹配以re开头的单词的后半部 分(除了re以外的部分),例如在查找reading a book时,它匹配ading。

假如你想要给一个很长的数字中每三位间加一个逗号(当然是从右边加起了),你可以这样查找需要在前面和里面添加逗号的部分:((?<=d)d{3})+b,用它对1234567890进 行查找时结果是234567890。

下面这个例子同时使用了这两种断言:(?<=s)d+(?=s)匹配以空白符间隔的数字(再次强调,不包括这些空白符)。

负向零宽断言

前面我们提到过怎么查找不是某个字符或不在某个字符类里的字符的方法(反义)。但是如果我们只是想要确 保某个字符没有出现,但并不想去匹配它时怎么办?例如,如果我们想查找这样的单词–它里面出现了字母q,但是q后面跟的不是字母u, 我们可以尝试这样:

bw*q[^u]w*b匹配包含后 面不是字母u的字母q的单词。但是如果多做测试(或者你思维足够敏锐,直接就观察出来了),你会发现,如果q出现在单词 的结尾的话,像Iraq,Benq, 这个表达式就会出错。这是因为[^u]总要匹配一个字符,所以如果q是单词的最后一个字符的话,后面的[^u]将 会匹配q后面的单词分隔符(可能是空格,或者是句号或其它的什么),后面的w*b将会匹配下一 个单词,于是bw*q[^u]w*b就能匹配整个Iraq fighting。负向零宽断言能解决这 样的问题,因为它只匹配一个位置,并不消费任何字符。现在,我们可以这样来解决这个问题:bw*q(?!u)w*b。

零宽度负预测先行断言(?!exp),断言此位置的后面不能匹配表达式exp。例如:d{3}(?!d)匹 配三位数字,而且这三位数字的后面不能是数字;b((?!abc)w)+b匹 配不包含连续字符串abc的单词。

同理,我们可以用(?<!exp),零 宽度负回顾后发断言来断言此位置的前面不能匹配表达式exp:(?<![a-z])d{7}匹配前面不是小写字母的七位数 字。

请详细分析表达式(?<=<(w+)>).*(?=</1>), 这个表达式最能表现零宽断言的真正用途。

一个更复杂的例子:(?<=<(w+)>).*(?=</1>)匹 配不包含属性的简单HTML标签内里的内容。(<?(w+)>)指 定了这样的前缀:被尖括号括起来的单词(比 如可能是<b>),然后是.*(任意的字符串),最后是一个后缀(?=</1>)。注意后缀里的/,它用到了前面提过的字符转 义;1则是一个反向 引用,引用的正是捕获的第一组,前面的(w+)匹 配的内容,这样如果前缀实际上是<b>的话,后缀就是</b>了。整个表达式匹配的是<b>和</b> 之间的内容(再次提醒,不包括前缀和后缀本身)。

注释

小括号的另一种用途是通过语法(?#comment)来包含注释。例如:2[0-4]d(?#200-249)|25[0-5](?#250-255)|[01]?dd?(?#0-199)。

要包含注释的话,最好是启用“忽略模式里的空白符”选项,这样在编写表达式时能任意的添加空格,Tab,换行,而实际使用时这些都将被忽 略。启用这个选项后,在#后面到这一行结束的所有文本都将被当成注释忽略掉。例如,我们可以前面的一个表达式写成这样:

      (?<=    # 断言要匹配的文本的前缀
      <(w+)> # 查找尖括号括起来的字母或数字(即HTML/XML标签)
      )       # 前缀结束
      .*      # 匹配任意文本
      (?=     # 断言要匹配的文本的后缀
      </1>  # 查找尖括号括起来的内容:前面是一个"/",后面是先前捕获的标签
      )       # 后缀结束

贪婪与懒惰

当正则表达式中包含能接受重复的限定符时,通常的行为是(在使整个表达式能得到匹配的前提下)匹配尽可能多的 字符。以这个表达式为例:a.*b,它将会匹配最长的以 a开始,以b结束的字符串。如果用它来搜索aabab的话,它会匹配整个字符串aabab。这被称为贪婪匹配。

有时,我们更需要懒惰匹配,也就是匹配尽可能少的 字符。前面给出的限定符都可以被转化为懒惰匹配模式,只要在它后面加上一个问号?。这样.*?就意味着匹配任意数量的重复,但是在能使整个匹配成功的前提 下使用最少的重复。现在看看懒惰版的例子吧:

a.*?b匹配最短的,以a开始,以b结 束的字符串。如果把它应用于aabab的话,它会匹配aab(第一到第三个字符)和ab(第四到第五个字符)。

为什么第一个匹配是aab(第一到第三个字符)而不是ab(第二到第三个字符)?简单地说,因为正则表达式有另 一条规则,比懒惰/贪婪规则的优先级更高:最先开始的匹配拥有最高的优先权——The match that begins earliest wins。

表5.懒惰限定符
代码/语法 说明
*? 重复任意次,但尽可能少重复
+? 重复1次或更多次,但尽可能少重复
?? 重复0次或1次,但尽可能少重复
{n,m}? 重复n到m次,但尽可能少重复
{n,}? 重复n次以上,但尽可能少重复

处理选项

在C#中,你可以使用Regex(String, RegexOptions)构造函数来设置正则表达式的处理选项。 如:Regex regex = new Regex(@”baw{6}b”, RegexOptions.IgnoreCase);

上面介绍了几个选项如忽略大小写,处理多行等,这些选项能用来改变处理正则表达式的方式。下面是.Net中常用的正则表达式选项:

表6.常用的处理选项
名称 说明
IgnoreCase(忽略大小写) 匹配时不区分大小写。
Multiline(多行模式) 更改^和$的 含义,使它们分别在任意一行的行首和行尾匹配,而不仅仅在整个字符串的开头和结尾匹配。(在此模式下,$的 精确含意是:匹配n之前的位置以及字符串结束前的位置.)
Singleline(单行模式) 更改.的含义,使它与每一个字符匹配(包括换行 符n)。
IgnorePatternWhitespace(忽略空白) 忽略表达式中的非转义空白并启用由#标记的注释。
ExplicitCapture(显式捕获) 仅捕获已被显式命名的组。

一个经常被问到的问题是:是不是只能同时使用多行模式和单行模式中的一种?答案是:不是。这两个选项之间没有任何关系,除了它们的名字比较 相似(以至于让人感到疑惑)以外。

平衡组/递归匹配

这里介绍的平衡组语法是由.Net Framework支持的;其它语言/库不一定支持这种功能,或者支持此功能但需要使用不同的语法。

有时我们需要匹配像( 100 * ( 50 + 15 ) )这样的可嵌套的层次性结构, 这时简单地使用(.+)则只会匹配到最左边的左括号和最右边的右括号之间的内容(这里我们讨论 的是贪婪模式,懒惰模式也有下面的问题)。假如原来的字符串里的左括号和右括号出现的次数不相等,比如( 5 / ( 3 + 2 ) ) ),那我们的匹配结果里两者的个数也不会相等。有没有办法在这样的字符串里匹配到最长的,配对的括号之间的 内容呢?

为了避免(和(把你的大脑 彻底搞糊涂,我们还是用尖括号代替圆括号吧。现在我们的问题变成了如何把xx <aa <bbb> <bbb> aa> yy这样的字符串里,最长的配对的尖括号内的内容捕获出来?

这里需要用到以下的语法构造:

  • (?’group’)把捕获的内容命名为group,并压入堆栈(Stack)
  • (?’-group’)从堆栈上弹出最后压入堆栈的名为group的捕获内容,如果堆栈本来为空,则本分组的匹配失败
  • (?(group)yes|no)如果堆栈上存在以名为group的捕获内容的话,继续匹配yes部分的表达式,否则继续匹配no部分
  • (?!)零宽负向先行断言,由于没有后缀表达式,试图匹配总是失败

如果你不是一个程序员(或者你自称程序员但是不知道堆栈是什么东西),你就这样理解上面的三种语法吧:第一个就 是在黑板上写一个”group”,第二个就是从黑板上擦掉一个”group”,第三个就是看黑板上写的还有没有”group”,如果有就继续匹配yes部 分,否则就匹配no部分。

我们需要做的是每碰到了左括号,就在压入一个”Open”,每碰到一个右括号,就弹出一个,到了最后就看看堆栈是否为空--如果不为空那就 证明左括号比右括号多,那匹配就应该失败。正则表达式引擎会进行回溯(放弃最前面或最后面的一些字符),尽量使整个表达式得到匹配。

<                         #最外层的左括号
    [^<>]*                #最外层的左括号后面的不是括号的内容
    (
        (
            (?'Open'<)    #碰到了左括号,在黑板上写一个"Open"
            [^<>]*       #匹配左括号后面的不是括号的内容
        )+
        (
            (?'-Open'>)   #碰到了右括号,擦掉一个"Open"
            [^<>]*        #匹配右括号后面不是括号的内容
        )+
    )*
    (?(Open)(?!))         #在遇到最外层的右括号前面,判断黑板上还有没有没擦掉的"Open";如果还有,则匹配失败

>                         #最外层的右括号

平衡组的一个最常见的应用就是匹配HTML,下面这个例子可以匹配嵌套的<div>标签:<div[^>]*>[^<>]*(((?’Open'<div[^>]*>)[^<>]*)+((?’-Open'</div>)[^<>]*)+)*(?(Open)(?!))</div>.

还有些什么东西没提到

上边已经描述了构造正则表达式的大量元素,但是还有很多没有提到的东西。下面是一些未提到的元素的列表,包含语法和简单的说明。你可以在网 上找到更详细的参考资料来学习它们–当你需要用到它们的时候。如果你安装了MSDN Library,你也可以在里面找到.net下正则表达式详细的文档。

这里的介绍很简略,如果你需要更详细的信息,而又没有在电脑上安装MSDN Library,可以查看关于正则表达式语言元素 的MSDN在线文档。

表7.尚未详细讨论的语法
代码/语法 说明
a 报警字符(打印它的效果是电脑嘀一声)
b 通常是单词分界位置,但如果在字符类里使用代表退格
t 制表符,Tab
r 回车
v 竖向制表符
f 换页符
n 换行符
e Escape
0nn ASCII代码中八进制代码为nn的字符
xnn ASCII代码中十六进制代码为nn的字符
unnnn Unicode代码中十六进制代码为nnnn的字符
cN ASCII控制字符。比如cC代表Ctrl+C
A 字符串开头(类似^,但不受处理多行选项的影响)
Z 字符串结尾或行尾(不受处理多行选项的影响)
z 字符串结尾(类似$,但不受处理多行选项的影响)
G 当前搜索的开头
p{name} Unicode中命名为name的字符类,例如p{IsGreek}
(?>exp) 贪婪子表达式
(?<x>-<y>exp) 平衡组
(?im-nsx:exp) 在子表达式exp中改变处理选项
(?im-nsx) 为表达式后面的部分改变处理选项
(?(exp)yes|no) 把exp当作零宽正向先行断言,如果在这个位置能匹配,使用yes作为 此组的表达式;否则使用no
(?(exp)yes) 同上,只是使用空表达式作为no
(?(name)yes|no) 如果命名为name的组捕获到了内容,使用yes作为表达式;否则使用 no
(?(name)yes) 同上,只是使用空表达式作为no

转自:http://www.kuqin.com/shuoit/20151110/348866.html

294 Responses to “ 正则表达式30分钟入门教程 ”

  1. see pron说道:

    c5ZLsk I’а†ve read several excellent stuff here. Certainly value bookmarking for revisiting. I surprise how so much attempt you set to make one of these fantastic informative web site.

  2. coloringbook说道:

    What a funny blog! I actually loved watching this humorous video with my relatives as well as with my colleagues.

  3. Lung Health说道:

    What as up, I log on to your blogs regularly. Your story-telling style is witty, keep it up!

  4. I simply could not go away your website prior to suggesting that I extremely enjoyed the usual info a person provide for your visitors? Is gonna be again steadily to check out new posts.

  5. Nice Site , guys! Rewarding Articles aswell. Right into my social bookmarks

  6. Click to read说道:

    Muchos Gracias for your post.Much thanks again. Keep writing.

  7. Thanks again for the blog article.Thanks Again. Great.

  8. visit说道:

    I really liked your blog article. Really Great.

  9. This excellent website definitely has all of the information I wanted concerning this subject and didn at know who to ask.

  10. visit说道:

    Very informative post.Really thank you! Keep writing.

  11. w88 world说道:

    Thanks for sharing, this is a fantastic blog article.Thanks Again. Want more.

  12. tiffany and co outlet Secure Document Storage Advantages | West Coast Archives

  13. inkishinov kossatzki akiva witches overkill rambert valcke tickets marzi

  14. Mca scam说道:

    There is evidently a bunch to identify about this. I consider you made various nice points in features also.

  15. WONDERFUL Post.thanks for share..more wait.. aаАа’б‚Т€ТšаЂаŒаАТ’аЂа†

  16. trap an hoi dep说道:

    I really liked your post.Really looking forward to read more. Much obliged.

  17. woking cab说道:

    Wow! This could be one particular of the most useful blogs We ave ever arrive across on this subject. Basically Fantastic. I am also an expert in this topic so I can understand your hard work.

  18. Wow, great article post.Really looking forward to read more. Cool.

  19. Wow! Thank you! I permanently needed to write on my site something like that. Can I take a part of your post to my website?

  20. microblog说道:

    Valuable info. Lucky me I found your website by accident, and I am shocked why this accident didn at happened earlier! I bookmarked it.

  21. go to see说道:

    It as just letting clientele are aware that we are nevertheless open up for home business.

  22. Really informative article post. Keep writing.

  23. Im grateful for the article post. Keep writing.

  24. Whats up are using WordPress for your blog platform?

  25. Asuquo说道:

    Wow, this piece of writing is fastidious, my younger sister is analyzing these things, therefore I am going to tell her.

  26. du an Rio Verde说道:

    wow, awesome article post. Really Great.

  27. I was recommended this website by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my trouble. You are incredible! Thanks!

  28. Nwokolo说道:

    You are my inhalation , I own few web logs and very sporadically run out from to brand.

  29. klm coupon code说道:

    Inspiring quest there. What happened after? Take care!

  30. Wow, awesome blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your web site is great, as well as the content!

  31. This very blog is obviously cool as well as diverting. I have discovered helluva helpful things out of it. I ad love to return every once in a while. Thanks a bunch!

  32. recycling说道:

    Very nice article and straight to the point. I am not sure if this is truly the best place to ask but do you folks have any ideea where to employ some professional writers? Thank you

  33. Mp3说道:

    You made some good points there. I looked on the net to find out more about the issue and found most individuals will go along with your views on this site.

  34. Chong tham说道:

    That is a great tip especially to those fresh to the blogosphere. Simple but very accurate information Thanks for sharing this one. A must read post!

  35. see the website说道:

    Pink your website submit and cherished it. Have you ever considered about visitor posting on other relevant weblogs equivalent to your website?

  36. Really informative blog.Thanks Again. Keep writing.

  37. That is a great tip especially to those fresh to the blogosphere. Short but very precise info Thanks for sharing this one. A must read post!

  38. viral marketing说道:

    times will often affect your placement in google and could damage your quality score if

  39. to learn more说道:

    There may be noticeably a bundle to find out about this. I assume you made sure nice points in options also.

  40. There as certainly a lot to know about this topic. I really like all the points you ave made.

  41. This submit truly made my day. You can not consider simply how a lot time

  42. online loans说道:

    I value the article.Much thanks again. Keep writing.

  43. pay day loans说道:

    Really enjoyed this article.Really thank you! Great.

  44. congtyonline.com说道:

    Merely wanna admit that this is handy , Thanks for taking your time to write this.

  45. So pleased to possess discovered this submit.. Seriously useful perception, appreciate your posting.. Appreciate the posting you given.. indeed, analysis is paying off.

  46. sua hat huu co说道:

    Major thanks for the post.Really looking forward to read more. Really Great.

  47. thuc pham huu co说道:

    Say, you got a nice blog post.Much thanks again. Really Cool.

  48. sim mobifone说道:

    the information you provide here. Please let me know

  49. Major thanks for the article post.Really thank you! Really Great.

  50. sidekick说道:

    me, but for yourself, who are in want of food.

  51. click here说道:

    This is really interesting, You certainly are a very qualified blogger. I possess joined your rss and enjoy seeking more of one as fantastic post. Also, I have got shared your blog in my myspace!

  52. girls说道:

    Terrific post however , I was wanting to know if you could write a litte more

  53. Hosting说道:

    these camera look like it was used in star trek movies.

  54. check this out说道:

    In my view, if all webmasters and bloggers made good content as you

  55. buy fast proxy说道:

    Pretty section of content. I just stumbled upon your weblog and in accession capital to
    assert that I acquire in fact enjoyed account your blog posts.
    Anyway I’ll be subscribing to your augment and even I achievement
    you access consistently fast.

  56. I really liked your blog.Much thanks again. Really Cool.

  57. Polainas tejidas说道:

    Really appreciate you sharing this post.Really looking forward to read more. Cool.

  58. Crochet poncho说道:

    Say, you got a nice article post.Much thanks again. Cool.

  59. Kangerlussuaq说道:

    Really glad I found this great information, thanks

  60. local说道:

    Way cool! Some extremely valid points! I appreciate you penning this post plus the rest of the site is also really good.

  61. white shoes说道:

    themselves, specifically considering the truth that you just may possibly have completed it if you ever decided. The pointers also served to supply an excellent approach to

  62. Looking forward to reading more. Great blog post.Really looking forward to read more. Much obliged.

  63. School admission说道:

    Thanks again for the blog post.Really thank you! Cool.

  64. School news说道:

    You made some good points there. I checked on the internet to learn more about the issue and found most people will go along with your views on this website.

  65. ps4 ark servers说道:

    I think this is a real great article post.Much thanks again. Cool.

  66. Wow, great article post.Really thank you! Great.

  67. Some great info on your blog, I want to read more as soon as I have sometime.

  68. Gertrudis说道:

    Usually My spouse and i don at send ahead web sites, on the contrary I may possibly wish to claim that this particular supply in fact forced us to solve this. Fantastically sunny submit!

  69. tm objection说道:

    wow, awesome post.Much thanks again. Really Cool.

  70. Apple Reparatur说道:

    Thanks for sharing, this is a fantastic article post.Really thank you! Really Great.

  71. Personally, if all site owners and bloggers made good content as you did, the web will be a lot more useful than ever before.

  72. It as nice to definitely arrive a web internet site in which the blogger is intelligent. Thanks for creating your web internet site.

  73. cris urzua说道:

    Thank you ever so for you post.Really thank you! Great.

  74. There is noticeably a lot to identify about this. I feel you made certain good points in features also.

  75. Wow, awesome blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your site is great, let alone the content!

  76. entclass说道:

    Thanks for sharing your info. I really appreciate your efforts and I will be waiting for your further post thanks once again.

  77. Really appreciate you sharing this article.Thanks Again. Great.

  78. Way cool! Some extremely valid points! I appreciate you writing this write-up plus the rest of the site is really good.

  79. really useful material, in general I imagine this is worthy of a book mark, many thanks

  80. This web site truly has all of the info I wanted concerning this subject and didn at know who to ask.

  81. I was very pleased to find this website. I wanted to thank you for your time for this wonderful post!! I definitely enjoy reading it and I have you bookmarked to check out new stuff you blog post.

  82. Wow, great blog.Much thanks again. Cool.

  83. niw说道:

    Very good information. Lucky me I found your website by accident (stumbleupon). I have book-marked it for later!

  84. obviously like your website however you have to take a look at the spelling on quite a few of your posts.
    Several of them are rife with spelling problems and I find it very troublesome to inform the truth nevertheless I’ll certainly come again again.

  85. Hi to all, how is all, I think every one is getting more from this site, and your views are nice in favor of new
    users.

  86. iаЂа›?Bewerten Sie hier kostenlos Ihre Webseite.

  87. website link说道:

    I am not positive where you’re getting your information, but great topic.
    I needs to spend a while studying more or figuring out more.
    Thank you for magnificent info I used to be in search of this info for my mission.

  88. weblink说道:

    Thanks a bunch for sharing this with all folks you really know what you are talking about!
    Bookmarked. Kindly additionally discuss with my web site
    =). We may have a hyperlink change contract among us

  89. gnc detox说道:

    Wonderful website you have here but I was
    curious if you knew of any community forums that cover the same topics talked about in this article?
    I’d really like to be a part of community where I can get advice from other experienced people
    that share the same interest. If you have any suggestions, please
    let me know. Bless you!

  90. My brother recommended I might like this web site. He was entirely right. This post truly made my day. You can not imagine simply how much time I had spent for this information! Thanks!

  91. fps说道:

    Having read this I thought it was rather informative.
    I appreciate you spending some time and energy to put this short article together.

    I once again find myself spending way too much time both
    reading and commenting. But so what, it was still worthwhile!

  92. Wow! This can be one particular of the most helpful blogs We have ever arrive across on this subject. Basically Wonderful. I am also an expert in this topic so I can understand your effort.

  93. click resources说道:

    modified by way of flipping armrests. With these ensembles, you could transform a few

  94. Perfectly written content , appreciate it for information.

  95. click for more说道:

    Its like you read my mind! You appear to know so much

  96. I’а†ve read several excellent stuff here. Certainly value bookmarking for revisiting. I surprise how so much attempt you set to make one of these fantastic informative web site.

  97. Usually I don at read post on blogs, however I wish

  98. Share posts说道:

    Im thankful for the article post.Thanks Again. Really Great.

  99. Really interesting blog, keep up the good work!

  100. click here说道:

    There as certainly a great deal to learn about this issue. I love all the points you have made.

  101. If some one wants to be updated with latest technologies therefore he must be go to see this
    website and be up to date all the time.

  102. Whats Happening i am new to this, I stumbled upon this I have found It absolutely helpful and it has aided me out loads. I hope to give a contribution & help other users like its aided me. Good job.

  103. I truly appreciate this post. I have been looking everywhere for this! Thank God I found it on Bing. You have made my day! Thank you again.

  104. to learn more说道:

    I will not speak about your competence, the post simply disgusting

  105. I truly appreciate this blog.Much thanks again. Will read on

  106. Wow! This can be one particular of the most helpful blogs We ave ever arrive across on this subject. Actually Wonderful. I am also an expert in this topic so I can understand your hard work.

  107. It as best to participate in a contest for the most effective blogs on the web. I all recommend this site!

  108. Arcelia Burdin说道:

    It’s actually a cool and helpful piece of information. I am satisfied that you simply shared this helpful information with us. Please keep us informed like this. Thank you for sharing.

  109. I think other web site proprietors should take this website as an model, very clean and great user genial style and design, as well as the content. You are an expert in this topic!

  110. Chante说道:

    Nice blog here! Also your site loads up fast! What host are you using? Can I get your affiliate link to your host? I wish my site loaded up as fast as yours lol

  111. You made some first rate factors there. I seemed on the internet for the difficulty and located most individuals will associate with together with your website.

  112. Agen Joker123说道:

    Thank you ever so for you article post. Much obliged.

  113. Merely wanna admit that this is very helpful , Thanks for taking your time to write this.

  114. go there说道:

    Salute! Thank you very much for this marvelous website. It was fantastic joy to read.

  115. lawyer miami fl说道:

    pretty practical stuff, overall I feel this is worthy of a bookmark, thanks

  116. I really liked your article post.Thanks Again. Much obliged.

  117. go here说道:

    Very neat blog.Really thank you! Awesome.

  118. good day说道:

    Some truly wonderful blog posts on this website , thanks for contribution.

  119. vasectomised说道:

    What i don’t understood is actually how you are no longer really a lot more smartly-liked than you might be
    right now. You are so intelligent. You recognize
    thus considerably when it comes to this subject, produced
    me individually imagine it from so many various angles.
    Its like men and women don’t seem to be fascinated except it
    is something to do with Lady gaga! Your personal stuffs great.
    All the time deal with it up!

  120. It as really a great and useful piece of information. I am glad that you shared this useful information with us. Please keep us informed like this. Thank you for sharing.

  121. wonderful issues altogether, you simply received a new reader. What might you recommend in regards to your publish that you simply made some days ago? Any sure?

  122. limbing说道:

    My brother suggested I might like this website. He was entirely right.

    This post actually made my day. You can not imagine simply how
    much time I had spent for this information! Thanks!

  123. you heard about this new site ? Dallas SEO

  124. The Silent Shard This could almost certainly be quite useful for a few of the employment I decide to you should not only with my blog site but

  125. Muchos Gracias for your blog article. Really Cool.

  126. Major thankies for the blog post. Really Great.

  127. this website说道:

    It as not that I want to replicate your website, but I really like the style and design. Could you tell me which design are you using? Or was it custom made?

  128. If your real friends know you as your nickname, use that nickname as your first name online. When you first friend someone, focus on making a personal comment that weaves connection.

  129. blossomug.com说道:

    Sweet blog! I found it while surfing around on Yahoo News.
    Do you have any tips on how to get listed in Yahoo News?
    I’ve been trying for a while but I never
    seem to get there! Thank you

  130. reinsertion说道:

    This is the right blog for anyone who hopes to understand this topic.
    You know a whole lot its almost hard to argue with you (not
    that I personally will need to…HaHa). You definitely put a brand new
    spin on a topic which has been written about for ages. Excellent stuff,
    just great!

  131. I truly appreciate this blog article. Great.

  132. to a famous blogger if you are not already

  133. I blog often and I truly appreciate your content. This great article has
    really peaked my interest. I will bookmark your blog and keep checking for new details about once a week.
    I subscribed to your RSS feed as well.

  134. Very good blog! Do you have any suggestions for aspiring writers?
    I’m hoping to start my own blog soon but I’m a
    little lost on everything. Would you recommend starting with a free platform
    like WordPress or go for a paid option? There are so many choices out
    there that I’m totally confused .. Any tips? Thank you!

  135. Within the occasion you can email myself by incorporating suggestions in how you have produced your web site search this brilliant, I ad personally have fun right here.

  136. Game Online说道:

    Informative article, just what I was looking for.

  137. It as best to take part in a contest for one of the best blogs on the web. I will recommend this web site!

  138. find more说道:

    It’s amazing to pay a quick visit this site and reading the views of all friends regarding this post, while I am
    also eager of getting experience.

  139. This unique blog is definitely cool as well as amusing. I have found a bunch of handy stuff out of it. I ad love to come back again soon. Thanks a lot!

  140. This is one awesome article post. Really Great.

  141. Title It is really a nice and helpful piece of info. I am glad that you shared this useful information with us. Please keep us informed like this. Thank you for sharing.

  142. mua backlink说道:

    Wow, great article post.Really thank you! Really Cool.

  143. Your means of explaining all in this piece of writing is genuinely fastidious, all can without difficulty be aware of it, Thanks a lot.

  144. texas说道:

    Fine way of telling, and pleasant paragraph to
    get information about my presentation subject, which i am going to deliver in college.

  145. appointment说道:

    Keep on working, great job!

  146. You are so interesting! I do not suppose I have read
    a single thing like that before. So nice to discover somebody with
    a few unique thoughts on this subject. Really..
    thank you for starting this up. This website is
    something that is needed on the web, someone with a bit of originality!

  147. wow, awesome blog post.Really looking forward to read more. Keep writing.

  148. QuickQuid说道:

    I was recommended this web site by my cousin.
    I am not sure whether this post is written by him as nobody else know such detailed about my
    problem. You’re amazing! Thanks!

  149. Hey There. I found your blog using msn. This is an extremely well written article.
    I’ll make sure to bookmark it and come back to read more of your useful
    info. Thanks for the post. I’ll definitely comeback.

  150. After looking over a number of the articles on your web page, I truly appreciate your technique of writing a blog.
    I book marked it to my bookmark webpage list and will be checking back in the near future.
    Please check out my web site as well and let me know how you feel.

  151. You’ve made some really good points there. I looked on the net to find out more about the issue and found most people will go along with your views on this web site.

  152. Tapes and Containers are scanned and tracked by CRIM as data management software.

  153. Very neat blog.Much thanks again. Fantastic.

  154. Spot on with this write-up, I honestly think
    this website needs a great deal more attention. I’ll probably be back again to read through more, thanks
    for the advice!

  155. Barcode Scanner说道:

    Wow! This can be one particular of the most helpful blogs We ave ever arrive across on this subject. Actually Wonderful. I am also an expert in this topic so I can understand your hard work.

  156. Thanks again for the blog post.Really looking forward to read more. Fantastic.

  157. I truly appreciate this article.Much thanks again. Cool.

  158. That is a very good tip especially to those fresh to the blogosphere. Brief but very precise information Thanks for sharing this one. A must read post!

  159. bitcoin说道:

    WONDERFUL Post.thanks for share..more wait..

  160. Wonderful article! We will be linking to this particularly great content on our website.
    Keep up the great writing.

  161. There as noticeably a bundle to learn about this. I assume you made certain nice points in features also.

  162. My brother suggested I might like this website. He was totally right. This post truly made my day. You can not imagine simply how much time I had spent for this info! Thanks!

  163. Regards for helping out, superb information. The surest way to be deceived is to think oneself cleverer than the others. by La Rochefoucauld.

  164. Really appreciate you sharing this article post. Fantastic.

  165. Hmm it looks like your blog ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog.
    I as well am an aspiring blog writer but I’m still new to
    everything. Do you have any helpful hints for newbie blog
    writers? I’d genuinely appreciate it.

  166. Really informative post.Much thanks again. Will read on

  167. well happy to share my knowledge here with mates.

  168. suba me说道:

    ErD6Hs Really enjoyed this article. Will read on

  169. I will right away clutch your rss as I can at find your email subscription hyperlink or e-newsletter service. Do you ave any? Please allow me recognise so that I may just subscribe. Thanks.

  170. mia pron khalifa说道:

    WZEM2F There is obviously a bunch to realize about this. I believe you made some good points in features also.

  171. Thanks for the post.Really looking forward to read more. Will read on

  172. Say, you got a nice article.Really looking forward to read more. Much obliged.

  173. Some really great articles on this web site , appreciate it for contribution.

  174. Thanks so much for the post.Really looking forward to read more.

  175. Westwood realtor说道:

    Some really prime posts on this web site , saved to my bookmarks.

  176. I’а†ve recently started a web site, the info you offer on this web site has helped me tremendously. Thanks for all of your time & work.

  177. go there说道:

    Spot on with this write-up, I actually assume this website needs rather more consideration. I?ll in all probability be again to read rather more, thanks for that info.

  178. What as up, how as it going? Just shared this post with a colleague, we had a good laugh.

  179. bistro masa说道:

    Normally I do not read post on blogs, but I wish to say that this write-up very forced me to try and do it! Your writing style has been surprised me. Thanks, very nice article.

  180. Singapore Tattoo说道:

    Thanks-a-mundo for the blog post.Really looking forward to read more. Great.

  181. Your style is so unique in comparison to other folks I ave read stuff from. Thank you for posting when you have the opportunity, Guess I all just bookmark this page.

  182. link vao 188bet说道:

    in a search engine as natural or un-paid (organic) search results.

  183. High Quality说道:

    I went over this internet site and I think you have a lot of great information, saved to favorites (:.

  184. see the website说道:

    Loving the info on this web site, you have done outstanding job on the articles.

  185. My coder is trying to convince me to move to .net from
    PHP. I have always disliked the idea because of the costs.

    But he’s tryiong none the less. I’ve been using Movable-type on numerous websites for about a year and am worried about switching to another platform.
    I have heard fantastic things about blogengine.net.
    Is there a way I can import all my wordpress posts into it?
    Any help would be really appreciated!

  186. Kickboxing说道:

    There is clearly a bunch to identify about this. I assume you made various nice points in features also.

  187. Tattoo Artists说道:

    This awesome blog is definitely entertaining additionally amusing. I have chosen many handy tips out of this amazing blog. I ad love to return again and again. Thanks a bunch!

  188. whoah this weblog is excellent i love studying your articles.

  189. Muchos Gracias for your article. Fantastic.

  190. There is visibly a bundle to identify about this. I consider you made various good points in features also.

  191. You have brought up a very excellent details, appreciate it for the post.

  192. her latest blog说道:

    Thanks for finally talking about > 正则表达式30分钟入门教程 | 编程小贴士 < Loved it!

  193. sex说道:

    Tiffany Jewelry Secure Document Storage Advantages | West Coast Archives

  194. houston escorts说道:

    You made some first rate factors there. I seemed on the internet for the difficulty and located most individuals will associate with together with your website.

  195. Wow, great article post.Much thanks again. Want more.

  196. crypto说道:

    I really liked your blog.Much thanks again. Will read on

  197. Thank you ever so for you blog.Thanks Again. Keep writing.

  198. If I set up my own blogging web site. Is it okay to copy and paste pics on my site to suppour my blogging?

  199. Wow! Thank you! I permanently wanted to write on my website something like that. Can I include a fragment of your post to my site?

  200. long time watcher and I just thought IaаАа’б‚Т€ТšаЂаŒаАа’б‚Т€ТžаБТžd drop by and say hi there there for your really initially time.

  201. Miami Escorts说道:

    you have a terrific blog here! would you like to make some invite posts on my blog?

  202. pokeronline说道:

    You need to get involved in a contest for one of the most useful blogs on the web. I’m going to recommend this web site!

  203. wow, awesome blog.Really thank you! Keep writing.

  204. Thanks a lot for the blog article. Much obliged.

  205. Utterly written subject matter, appreciate it for selective information.

  206. Its hard to find good help I am constantnly proclaiming that its hard to find good help, but here is

  207. houston escorts说道:

    I?d should verify with you here. Which is not something I often do! I take pleasure in reading a publish that may make individuals think. Also, thanks for allowing me to comment!

  208. Wow, great article.Much thanks again. Keep writing.

  209. This is really fascinating, You are a very professional blogger. I ave joined your rss feed and sit up for searching for more of your great post. Also, I have shared your site in my social networks!

  210. healthy meals说道:

    Very neat article post.Much thanks again. Great.

  211. agen poker说道:

    Real estate is very market specific and if you invest correctly, by city, geographical area within the city and even to individual neighborhoods and streets you can make quite a bit of money. Another great option is to encourage your customers to follow you on Twitter.

  212. sbobet说道:

    Hello, I enjoy reading through your post. I wanted to write a little comment to support you.

  213. Thanks for helping out and about, superb data. The a number of stages regarding man are generally infancy, childhood, adolescence, and obsolescence. by Bruce Barton.

  214. Lifestyle News说道:

    Everyone loves what you guys are up too. This kind of clever work and reporting!
    Keep up the superb works guys I’ve incorporated you guys to my own blogroll.

  215. Major thankies for the blog post.Really looking forward to read more. Will read on…

  216. nem lo xo说道:

    Thanks so much for the blog post.Thanks Again. Awesome.

  217. 먹튀 검증说道:

    Thanks for sharing, this is a fantastic blog post.Much thanks again. Really Cool.

  218. 먹튀폴리스说道:

    Really enjoyed this article.Thanks Again. Really Cool.

  219. cat tales说道:

    I am usually to running a blog and i actually appreciate your content. The article has actually peaks my interest. I am going to bookmark your web site and keep checking for new information.

  220. pretty valuable stuff, overall I consider this is worthy of a bookmark, thanks

  221. Im obliged for the blog.Much thanks again. Will read on

  222. Im thankful for the post.Much thanks again. Cool.

  223. Thanks for sharing, this is a fantastic blog article.Really looking forward to read more. Cool.

  224. Its hard to find good help I am forever proclaiming that its hard to get good help, but here is

  225. Centres说道:

    the time to study or visit the material or web sites we ave linked to below the

  226. Hello there! I could have sworn I’ve been to this website before but
    after checking through some of the post I realized it’s new to
    me. Anyways, I’m definitely delighted I found it and I’ll be bookmarking and checking
    back frequently!

  227. Marketing说道:

    What’s up to every single one, it’s actually a good for me to pay a
    quick visit this web page, it consists of valuable Information.

  228. Schedule说道:

    Useful info. Lucky me I discovered your web site by chance, and I
    am stunned why this coincidence did not took place in advance!

    I bookmarked it.

  229. Hello there, I found your website via Google whilst searching for a comparable matter,
    your web site came up, it looks great. I’ve bookmarked it in my google bookmarks.

    Hi there, simply changed into alert to your blog through
    Google, and located that it is really informative.
    I am gonna watch out for brussels. I’ll appreciate should you proceed this in future.
    A lot of people will probably be benefited out of your writing.
    Cheers!

  230. 릴 게임说道:

    online dating websites This actually answered my problem, thanks!

  231. I value the article post.Thanks Again. Keep writing.

  232. TE210说道:

    Very clear site, thankyou for this post.

  233. 먹튀 검증说道:

    sure, study is having to pay off. So pleased to have located this post.. So content to have located this post.. So content to get located this article..

  234. 토토 사이트说道:

    Just that is necessary. I know, that together we can come to a right answer.

  235. 바다 이야기说道:

    Some truly interesting information, well written and broadly user pleasant.

  236. Just my opinion, it might make your posts a little bit more interesting.

  237. 다잡아说道:

    I thought it was going to be some boring old post, but it really compensated for my time. I will post a link to this page on my blog. I am sure my visitors will find that very useful.

  238. I value the post.Much thanks again. Want more.

  239. just your articles? I mean, what you say is important and all.

  240. Nonton Anime说道:

    some jewelry stores offer a good deal of bargain for their new jewelry styles*

  241. Vancouver SEO说道:

    Wow, great blog article.Thanks Again. Keep writing.

  242. It’а†s actually a great and helpful piece of information. I am happy that you shared this useful info with us. Please stay us up to date like this. Thanks for sharing.

  243. 먹튀폴리스说道:

    Thanks for an extremely wonderful write-up, I love reading through it and absolutely sure will keep coming back again

  244. What as up i am kavin, its my first time to commenting anyplace, when i read this post i thought i could also make comment due to

  245. Rattling good info can be found on web blog.

  246. 우리카지노说道:

    There is certainly a great deal to know about this topic. I like all the points you made.

  247. Spot on with this write-up, I absolutely think this web site needs far more attention. I all probably be returning to read through more, thanks for the information!

  248. Wow! This can be one particular of the most useful blogs We have ever arrive across on this subject. Actually Excellent. I am also a specialist in this topic so I can understand your effort.

  249. Really enjoyed this blog.Really thank you! Really Cool.

  250. Very good blog post.Really thank you! Much obliged.

  251. Jenni说道:

    continuously i used to read smaller articles that
    also clear their motive, and that is also happening with this post which I
    am reading now.

  252. Remap tuning ecu说道:

    Wow, awesome blog layout! How long have you been blogging for?
    you made blogging look easy. The overall look of your website is excellent, let alone the content!

  253. 다자바说道:

    you ave gotten an important weblog here! would you like to make some invite posts on my weblog?

  254. 바다이야기说道:

    Usually I don at read post on blogs, but I would like to say that this write-up very forced me to try and do it! Your writing style has been surprised me. Thanks, quite nice article.

  255. Remap tuning ecu说道:

    I loved as much as you’ll receive carried out right here.

    The sketch is tasteful, your authored material stylish.

    nonetheless, you command get got an shakiness over that
    you wish be delivering the following. unwell unquestionably come further formerly again as
    exactly the same nearly very often inside case you shield this increase.

  256. Very informative blog.Really looking forward to read more. Much obliged.

  257. cong ty qua tang说道:

    Way cool! Some extremely valid points! I appreciate you penning this post and the rest of the site is also very good.

  258. shower panels说道:

    Yay google is my world beater assisted me to find this great site!.

  259. I value the blog post.Thanks Again. Will read on

  260. Mike Goralski说道:

    Good day! Do you know if they make any plugins to protect against hackers? I’m kinda paranoid about losing everything I’ve worked hard on. Any recommendations?

  261. My partner and i picture this may be several on the actual information? nonetheless My partner and i nevertheless consider which it typically would work for just about any form of issue materials, because of it could steadily become pleasurable to determine any comfortable and also pleasant deal with or possibly hear any tone of voice while original landing.

  262. Normally I don’t learn post on blogs, but I would like
    to say that this write-up very pressured me to check out and
    do it! Your writing taste has been surprised me. Thank you, quite
    nice post.

  263. nice application. it is like i have my own financial toolbar like money-bar on my phone. this truly can make my life easier.

  264. tips on how to lose weight fast WALSH | ENDORA

  265. This blog post is excellent, probably because of how well the subject was developed. I like some of the comments too.

  266. Mai Forgette说道:

    Sometimes its safer to just take a step back and understand that not everybody shares your beliefs

  267. Shannon Bryla说道:

    I am glad to be one of the visitors on this great website (:, appreciate it for posting .

  268. We are a bunch of volunteers and starting a new scheme
    in our community. Your website offered us with useful info to
    work on. You’ve done a formidable activity and our
    whole neighborhood will probably be thankful to you.

  269. Thank you for your article. Really Cool.

  270. Really informative blog article.Much thanks again. Want more.

  271. What’s up mates, good article and nice arguments commented
    here, I am actually enjoying by these.

  272. Wow, awesome blog layout! How long have you been blogging for? you made blogging look easy. The overall look of your web site is fantastic, let alone the content!. Thanks For Your article about sex.

  273. I feel that is an enchanting element, it made me think a bit. Thanks for sparking my thinking cap. From time to time I get so much in a rut that I just really feel like a record.

  274. 토토 사이트说道:

    Way cool! Some very valid points! I appreciate you writing this post and also the rest of the website is really good.

  275. 바다이야기说道:

    Thanks a lot for the blog post.Much thanks again. Cool.

  276. Stanton Cadigan说道:

    The next time I read a blog, I hope that it doesnt disappoint me as much as this one. I mean, I know it was my choice to read, but I actually thought youd have something interesting to say. All I hear is a bunch of whining about something that you could fix if you werent too busy looking for attention.

  277. 토토 사이트说道:

    Wow, fantastic blog layout! How long have you been blogging for? you made blogging look easy. The overall look of your web site is excellent, as well as the content!

  278. My brother suggested I might like this website. He was entirely right.
    This post actually made my day. You can not imagine simply how much time I had spent for this information! Thanks!

  279. Sid Ambrosino说道:

    Bless you for this particular facts I has been checking all Msn to be able to come across it!

  280. I have watched “boston legal” ever since in my college days, i love to watch courtroom drama,.

  281. Gorgeous girls fucking their BFs. GF and ex-GF nude hot porn videos accessible for free. Enjoy out Girlfriend porn videos where nude girlfriend is willing to embody all of her boyfriendâ??s fantasies. Passionate girlfriend porn videos are always nasty and hot.

  282. 먹튀폴리스说道:

    I value the post.Really thank you! Cool.

  283. 야마토게임说道:

    This is very interesting, You are a very skilled blogger. I have joined your feed and look forward to seeking more of your fantastic post. Also, I have shared your site in my social networks!

  284. Wow, that as what I was exploring for, what a stuff! existing here at this website, thanks admin of this web site.

  285. Taylor Lautner… By the way you might want to check out this cool site I found……

  286. porn说道:

    Very informative blog.Thanks Again. Really Cool.

  287. Tattoo Studio说道:

    This blog is without a doubt entertaining additionally factual. I have found many useful stuff out of this source. I ad love to return again and again. Thanks a lot!

  288. declutter说道:

    Very good article.Really looking forward to read more. Cool.

  289. 먹튀 폴리스说道:

    Thanks again for the article post.Thanks Again. Awesome.

  290. ItaаАа’б‚Т€ТšаЂаŒаАа’б‚Т€ТžаБТžs really a nice and helpful piece of info. I am glad that you shared this useful information with us. Please keep us informed like this. Thanks for sharing.

  291. 먹튀라이언说道:

    Red your website put up and liked it. Have you at any time considered about visitor submitting on other associated blogs similar to your website?

  292. Very nice blog post. I absolutely appreciate this website. Stick with it!

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>