<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='http://feeds.feedsky.com/styles/temp01.xsl' type='text/xsl' ?><!--这是一个由Feedsy提供技术支持的Feed，为了提高读者阅读的体验，以及满足用户美化自己Feed的需要，我们设计了多种精美的Feed模板，提供给大家选择，所有最终呈现出来的样式，皆由用户自愿选择使用，未经许可，任何团体和个人，请不要擅自修改样式或者盗用，这是对于用户选择权的尊重。--><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fs="http://www.feedsky.com/namespace/feed" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link href="http://feeds.feedsky.com/csdn.net/lxcnn" type="application/rss+xml" rel="self"></atom:link><fs:self_link href="http://feeds.feedsky.com/csdn.net/lxcnn" type="application/rss+xml"></fs:self_link><lastBuildDate>Sun, 28 Jun 2009 15:17:00 GMT</lastBuildDate><title>雁过无痕</title><description>雁过也，了无痕</description><link>http://blog.csdn.net/lxcnn/</link><item><title>正则基础之——环视</title><link>http://blog.csdn.net/lxcnn/archive/2009/06/28/4304754.aspx</link><wfw:comment>http://blog.csdn.net/lxcnn/comments/4304754.aspx</wfw:comment><slash:comments>1</slash:comments><wfw:commentRss>http://blog.csdn.net/lxcnn/comments/commentRss/4304754.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=4304754</trackback:ping><description>环视(Lookaround)1       环视基础环视只进行子表达式的匹配，不占有字符，匹配到的内容不保存到最终的匹配结果，是零宽度的。环视匹配的最终结果就是一个位置。环视的作用相当于对所在位置加了一个附加条件，只有满足这个条件，环视子表达式才能匹配成功。环视按照方向划分有顺序和逆序两种，按照是否匹配有肯定和否定两种，组合起来就有四种环视。顺序环视相当于在当前位置右侧附加一个条件，而逆序环视相当于在当前位置左侧附加一个条件。表达式说明(?逆序肯定环视，表示所在位置左侧能够匹配Expression(?逆序否定环视，表示所在位置左侧不能匹配Expression(?=Expression)顺序肯定环视，表示所在位置右侧能够匹配Expression(?!Expression)顺序否定环视，表示所在位置右侧不能匹配Expression 对于环视的叫法，有的文档里叫预&lt;img src =&quot;http://blog.csdn.net/lxcnn/aggbug/4304754.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/238033996/lxcnn/csdn.net/s.gif?r=http://blog.csdn.net/lxcnn/archive/2009/06/28/4304754.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/lxcnn/238033996/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/lxcnn/238033996/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sun, 28 Jun 2009 23:17:00 +0800</pubDate><author>lxcnn</author><comments>http://blog.csdn.net/lxcnn/archive/2009/06/28/4304754.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/lxcnn/archive/2009/06/28/4304754.aspx</guid><dc:creator>lxcnn</dc:creator><fs:srclink>http://blog.csdn.net/lxcnn/archive/2009/06/28/4304754.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/lxcnn/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/lxcnn/~1044647/238033996/1044647</fs:itemid></item><item><title>正则基础之——NFA引擎匹配原理</title><link>http://blog.csdn.net/lxcnn/archive/2009/06/28/4304651.aspx</link><wfw:comment>http://blog.csdn.net/lxcnn/comments/4304651.aspx</wfw:comment><slash:comments>1</slash:comments><wfw:commentRss>http://blog.csdn.net/lxcnn/comments/commentRss/4304651.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=4304651</trackback:ping><description>&lt;br /&gt;NFA引擎匹配原理1       为什么要了解引擎匹配原理&lt;br /&gt;一个个音符杂乱无章的组合在一起，弹奏出的或许就是噪音，同样的音符经过作曲家的手，就可以谱出非常动听的乐曲，一个演奏者同样可以照着乐谱奏出动听的乐曲，但他/她或许不知道该如何去改变音符的组合，使得乐曲更动听。&lt;br /&gt;作为正则的使用者也一样，不懂正则引擎原理的情况下，同样可以写出满足需求的正则，但是不知道原理，却很难写出高效且没有隐患的正则。所以对于经常使用正则，或是有兴趣深入学习正则的人，还是有必要了解一下正则引擎的匹配原理的。2       正则表达式引擎&lt;br /&gt;正则引擎大体上可分为不同的两类：DFA和NFA，而NFA又基本上可以分为传统型NFA和POSIX NFA。&lt;br /&gt;DFA Deterministic finite automaton 确定型有穷自动机&lt;br /&gt;NFA Non-deterministic finite automaton　非确定型有穷自动机&lt;br /&gt;Traditional NFA&lt;br /&gt;POSIX NFA&lt;br /&gt;DFA引擎因为不需要回溯，所以匹配快速，但不支&lt;img src =&quot;http://blog.csdn.net/lxcnn/aggbug/4304651.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/238031194/lxcnn/csdn.net/s.gif?r=http://blog.csdn.net/lxcnn/archive/2009/06/28/4304651.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/lxcnn/238031194/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/lxcnn/238031194/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sun, 28 Jun 2009 22:26:00 +0800</pubDate><author>lxcnn</author><comments>http://blog.csdn.net/lxcnn/archive/2009/06/28/4304651.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/lxcnn/archive/2009/06/28/4304651.aspx</guid><dc:creator>lxcnn</dc:creator><fs:srclink>http://blog.csdn.net/lxcnn/archive/2009/06/28/4304651.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/lxcnn/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/lxcnn/~1044647/238031194/1044647</fs:itemid></item><item><title>正则基础之——小数点</title><link>http://blog.csdn.net/lxcnn/archive/2009/06/20/4284817.aspx</link><wfw:comment>http://blog.csdn.net/lxcnn/comments/4284817.aspx</wfw:comment><slash:comments>2</slash:comments><wfw:commentRss>http://blog.csdn.net/lxcnn/comments/commentRss/4284817.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=4284817</trackback:ping><description>小数点可以匹配除了换行符“\n”以外的任意一个字符，如要匹配小数点本身，用“\”进行转义“\.”。一些细节对于使用传统NFA引擎的大多数语言和工具，如Java、.NET来说，“.”的匹配范围是匹配除了换行符“\n”以外的任意一个字符。 但是对于javascript来说有些特殊，由于各浏览器的解析引擎不同，“.”的匹配范围也有所不同，对于Trident内核的浏览器，如IE来说，“.”同样是匹配除了换行符“\n”以外的任意一个字符，但是对于其它内核的浏览器，如Firefox、Opera、Chrome来说，“.”是匹配除了回车符“\r”和换行符“\n”以外的任意一个字符。 大概测了一下，Trident、Presto和Gecko应该都是采用的传统NFA引擎，而webkit至少是支持传统NFA引擎的，但是又与传统NFA引擎表现的不太一样，估计不是做了高级优化的传统NFA引擎，就是DFA/NFA混合引擎。&lt;img src =&quot;http://blog.csdn.net/lxcnn/aggbug/4284817.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/236639027/lxcnn/csdn.net/s.gif?r=http://blog.csdn.net/lxcnn/archive/2009/06/20/4284817.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/lxcnn/236639027/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/lxcnn/236639027/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sat, 20 Jun 2009 20:12:00 +0800</pubDate><author>lxcnn</author><comments>http://blog.csdn.net/lxcnn/archive/2009/06/20/4284817.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/lxcnn/archive/2009/06/20/4284817.aspx</guid><dc:creator>lxcnn</dc:creator><fs:srclink>http://blog.csdn.net/lxcnn/archive/2009/06/20/4284817.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/lxcnn/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/lxcnn/~1044647/236639027/1044647</fs:itemid></item><item><title>正则表达式学习参考</title><link>http://blog.csdn.net/lxcnn/archive/2009/06/14/4268033.aspx</link><wfw:comment>http://blog.csdn.net/lxcnn/comments/4268033.aspx</wfw:comment><slash:comments>12</slash:comments><wfw:commentRss>http://blog.csdn.net/lxcnn/comments/commentRss/4268033.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=4268033</trackback:ping><description>正则表达式学习参考&lt;img src =&quot;http://blog.csdn.net/lxcnn/aggbug/4268033.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/236639028/lxcnn/csdn.net/s.gif?r=http://blog.csdn.net/lxcnn/archive/2009/06/14/4268033.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/lxcnn/236639028/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/lxcnn/236639028/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sun, 14 Jun 2009 19:12:00 +0800</pubDate><author>lxcnn</author><comments>http://blog.csdn.net/lxcnn/archive/2009/06/14/4268033.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/lxcnn/archive/2009/06/14/4268033.aspx</guid><dc:creator>lxcnn</dc:creator><fs:srclink>http://blog.csdn.net/lxcnn/archive/2009/06/14/4268033.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/lxcnn/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/lxcnn/~1044647/236639028/1044647</fs:itemid></item><item><title>捕获组（capture group）</title><link>http://blog.csdn.net/lxcnn/archive/2009/05/03/4146148.aspx</link><wfw:comment>http://blog.csdn.net/lxcnn/comments/4146148.aspx</wfw:comment><slash:comments>2</slash:comments><wfw:commentRss>http://blog.csdn.net/lxcnn/comments/commentRss/4146148.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=4146148</trackback:ping><description>捕获组就是把正则表达式中子表达式匹配的内容，保存到内存中以数字编号或手动命名的组里，方便后面引用 捕获组有两种形式一种是普通的捕获组，不产生歧义的情况下，后面简称捕获组，语法规则：(expression)；另一种是命名捕获组，语法规则：(?expression)或者(?'name'expression)，这两种写法是等价的。 1、编号规则如果没有显式为捕获组命名，即没有使用命名捕获组，那么需要按数字顺序来访问所有捕获组在只有普通捕获组的情况下，捕获组的编号是按照“(”出现的顺序，从左到右编号的  (\d{4})-(\d{2}-(\d\d))1        1 2          3    3 2 上面的正则表达式可以用来匹配格式为yyyy-MM-dd的日期，为了在下表中得以区分，采用了\d{2}和\d\d两种写法还有一个默认编号为0的组，表示的是正则表达式的整体用以上正则表达式匹配字符串：2008-12-31匹配结果为：编号命名捕获组匹配内容0 (\d{4})-(\d{2}-(\d\d))2008-12-311 (\d{4})20082 (\d{2}-(\d\d))12&lt;img src =&quot;http://blog.csdn.net/lxcnn/aggbug/4146148.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/lxcnn/236639029/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/lxcnn/236639029/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Mon, 04 May 2009 04:27:00 +0800</pubDate><author>lxcnn</author><comments>http://blog.csdn.net/lxcnn/archive/2009/05/03/4146148.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/lxcnn/archive/2009/05/03/4146148.aspx</guid><dc:creator>lxcnn</dc:creator><fs:srclink>http://blog.csdn.net/lxcnn/archive/2009/05/03/4146148.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/lxcnn/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/lxcnn/~1044647/236639029/1044647</fs:itemid></item><item><title>[ ] 字符组(Character Classes)</title><link>http://blog.csdn.net/lxcnn/archive/2009/04/29/4138218.aspx</link><wfw:comment>http://blog.csdn.net/lxcnn/comments/4138218.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/lxcnn/comments/commentRss/4138218.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=4138218</trackback:ping><description>[ ] 字符组(Character Classes)     []能够匹配所包含的一系列字符中的任意一个。需要注意的是，[]虽然能匹配其中的任意一个字符，但匹配的结果只能是一个字符，不是多个。    例如[abc]表示字符“a”或“b”或“c”。     []支持用连字符“-”连接两个字符，来表示一个字符范围。需要注意的是，“-”前后的两个字符是有顺序的，即使用相同的编码时，后面的字符码位应大于或等于前面字符的码位。    例如[a-z]表示任意一个小写字母。而在程序中使用[z-a]则会报“[x-y] 范围的顺序颠倒”这样的异常。     大部分在正则中有特殊意义、在匹配其本身时需转义的字符，在[]内是不需要转义的。必须转义的只有“\”、“[”和“]”，而“^”出现在[]开始位置，“-”前后构成范围区间时，需要转义，出现在其它位置不需要转义，例如[\^.$^{\[(|)*+?-\\]    在.NET中，不构成歧义的情况下，“[”和“]”可以不用转义，程序也可以得到预期结果，但是这种写法可读性较差，而且出现错误时不易排查，因此不推荐这种写法    举例：Regex reg = new &lt;img src =&quot;http://blog.csdn.net/lxcnn/aggbug/4138218.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/lxcnn/236639030/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/lxcnn/236639030/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Thu, 30 Apr 2009 07:53:00 +0800</pubDate><author>lxcnn</author><comments>http://blog.csdn.net/lxcnn/archive/2009/04/29/4138218.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/lxcnn/archive/2009/04/29/4138218.aspx</guid><dc:creator>lxcnn</dc:creator><fs:srclink>http://blog.csdn.net/lxcnn/archive/2009/04/29/4138218.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/lxcnn/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/lxcnn/~1044647/236639030/1044647</fs:itemid></item><item><title>开篇絮语</title><link>http://blog.csdn.net/lxcnn/archive/2009/04/29/4138172.aspx</link><wfw:comment>http://blog.csdn.net/lxcnn/comments/4138172.aspx</wfw:comment><slash:comments>4</slash:comments><wfw:commentRss>http://blog.csdn.net/lxcnn/comments/commentRss/4138172.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=4138172</trackback:ping><description>      转眼间在CSDN混迹已接近两年了，中间离开过一些日子，原以为我会很久才能回归，却不想造化弄人，只离开了半年左右，不过已基本告别了我所喜爱的代码世界。。。             两年前因为询问一个正则问题，来到了CSDN，渐渐的习惯了这里的生活，从最初的只知仰望夜空，数着一颗又一颗的星星，到后来尝试着去解答一些常见的问题；从最初的得到几十分而兴奋不已，到抢分已成为一种乐趣；从最初的一条裤衩，到现在马甲也有两星，偶尔想想，逝水流年，确是不堪回首！       遗憾的是，过客从来就不是一个程序员，过去不是，现在不是，我想，将来也不会是，每天游离于代码世界的边缘，从来都不得深入，或许论坛里的几颗星星砸出来还可唬住几个人，但过客却知道，自己只不过是个菜鸟罢了       很是怀念07年在CSDN吹水、抢分的日子，那一年认识了很多技术牛人，学到的很多知识，当然，也力所能及的帮了一些人，由于是因为询问正则问题而来的CSDN，所以也对正则有些特别的感情，甚至有些沉迷于正则，以至于当时有人把过客和正则划上了等号。现在由于工作的原因，远离了代码，也渐渐远离了网络，却又不想丢淡了曾经给我无限快&lt;img src =&quot;http://blog.csdn.net/lxcnn/aggbug/4138172.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/lxcnn/236639031/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/lxcnn/236639031/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Thu, 30 Apr 2009 07:28:00 +0800</pubDate><author>lxcnn</author><comments>http://blog.csdn.net/lxcnn/archive/2009/04/29/4138172.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/lxcnn/archive/2009/04/29/4138172.aspx</guid><dc:creator>lxcnn</dc:creator><fs:srclink>http://blog.csdn.net/lxcnn/archive/2009/04/29/4138172.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/lxcnn/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/lxcnn/~1044647/236639031/1044647</fs:itemid></item></channel></rss>