<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: [译]递归正则表达式</title>
	<atom:link href="http://iregex.org/blog/recursive-regular-expressions.html/feed" rel="self" type="application/rss+xml" />
	<link>http://iregex.org/blog/recursive-regular-expressions.html</link>
	<description>原创、翻译、转载关于正则表达式的文章</description>
	<lastBuildDate>Fri, 18 May 2012 03:20:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: PHP中的递归正则-传播、沟通、分享-一直“有你”</title>
		<link>http://iregex.org/blog/recursive-regular-expressions.html/comment-page-1#comment-3371</link>
		<dc:creator>PHP中的递归正则-传播、沟通、分享-一直“有你”</dc:creator>
		<pubDate>Mon, 10 May 2010 15:27:09 +0000</pubDate>
		<guid isPermaLink="false">http://iregex.org/?p=73#comment-3371</guid>
		<description>[...] 之前一篇文章翻译了Perl语言中的递归正则表达式. 其实不少语言中的正则都是支持递归的, 例如本文要介绍的PHP正则递归. 虽然, 工作中最常用的正则表达式都很”正则”, 只用最基本的语法就能解决85%以上的问题, 而且合理有效地使用普通正则来解决复杂问题也是一门技巧与学问; 但是高级一点的语法的确有它存的价值, 有时不用它还真办不了事儿; 况且学习正则的乐趣也在于尝试各种各样的可能性, 满足自己无穷无尽的好奇心. [...]</description>
		<content:encoded><![CDATA[<p>[...] 之前一篇文章翻译了Perl语言中的递归正则表达式. 其实不少语言中的正则都是支持递归的, 例如本文要介绍的PHP正则递归. 虽然, 工作中最常用的正则表达式都很”正则”, 只用最基本的语法就能解决85%以上的问题, 而且合理有效地使用普通正则来解决复杂问题也是一门技巧与学问; 但是高级一点的语法的确有它存的价值, 有时不用它还真办不了事儿; 况且学习正则的乐趣也在于尝试各种各样的可能性, 满足自己无穷无尽的好奇心. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 乱象，印迹 &#187; 正则问题，这边请</title>
		<link>http://iregex.org/blog/recursive-regular-expressions.html/comment-page-1#comment-2631</link>
		<dc:creator>乱象，印迹 &#187; 正则问题，这边请</dc:creator>
		<pubDate>Tue, 26 Jan 2010 02:19:53 +0000</pubDate>
		<guid isPermaLink="false">http://iregex.org/?p=73#comment-2631</guid>
		<description>[...] 相反，2010年1月11日晚我在上海龙阳路地铁站附近见到的两位朋友rex和cnhacktnt，都是“精于勤”的榜样：因为工作的原因，他们几乎每天都需要用到正则表达式，所以他们几乎是“全方位地”精通正则表达式：对语法的精确把握，对未知情况的处理，对匹配效率的要求……或许平时我们不需要注意这么多的方面，但多了解一点经验以供借鉴，总不是坏事。 举例来说吧：撰写高效率的正则表达式，需要注意哪些方面？更极端一点：正则表达式怎样匹配“0…1…”但‘0’和‘1’出现次数相同的字符串？这样的问题，对正则表达式没有相当研究和经验的人，是无法回答的。而答案和讨论，也让我这种半瓶醋看得眼花缭乱，大呼过瘾。 目前，国内已经有大量专业的开发论坛和社区，但是正则表达式这种“关键时候要命”的匕首式应用，总没有专门的场合讨论，这不能不说是一大遗憾。有鉴于此，rex同学开设了专门的正则表达式论坛 http://www.regex.me，大家有任何关于正则表达式的疑惑，都可以提问讨论，对《精通正则表达式》有什么意见，也可以自由发问，我会尽力解答。 [...]</description>
		<content:encoded><![CDATA[<p>[...] 相反，2010年1月11日晚我在上海龙阳路地铁站附近见到的两位朋友rex和cnhacktnt，都是“精于勤”的榜样：因为工作的原因，他们几乎每天都需要用到正则表达式，所以他们几乎是“全方位地”精通正则表达式：对语法的精确把握，对未知情况的处理，对匹配效率的要求……或许平时我们不需要注意这么多的方面，但多了解一点经验以供借鉴，总不是坏事。 举例来说吧：撰写高效率的正则表达式，需要注意哪些方面？更极端一点：正则表达式怎样匹配“0…1…”但‘0’和‘1’出现次数相同的字符串？这样的问题，对正则表达式没有相当研究和经验的人，是无法回答的。而答案和讨论，也让我这种半瓶醋看得眼花缭乱，大呼过瘾。 目前，国内已经有大量专业的开发论坛和社区，但是正则表达式这种“关键时候要命”的匕首式应用，总没有专门的场合讨论，这不能不说是一大遗憾。有鉴于此，rex同学开设了专门的正则表达式论坛 <a href="http://www.regex.me，大家有任何关于正则表达式的疑惑，都可以提问讨论，对《精通正则表达式》有什么意见，也可以自由发问，我会尽力解答。" rel="nofollow">http://www.regex.me，大家有任何关于正则表达式的疑惑，都可以提问讨论，对《精通正则表达式》有什么意见，也可以自由发问，我会尽力解答。</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rex</title>
		<link>http://iregex.org/blog/recursive-regular-expressions.html/comment-page-1#comment-2442</link>
		<dc:creator>rex</dc:creator>
		<pubDate>Wed, 13 Jan 2010 08:51:36 +0000</pubDate>
		<guid isPermaLink="false">http://iregex.org/?p=73#comment-2442</guid>
		<description>同样使用.Net语法，下面一道题的解法是：
\((?&gt;[^()]+&#124;\((?)&#124;\)(?))*?(?(C)(?!))\)</description>
		<content:encoded><![CDATA[<p>同样使用.Net语法，下面一道题的解法是：<br />
\((?&gt;[^()]+|\((?)|\)(?))*?(?(C)(?!))\)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rex</title>
		<link>http://iregex.org/blog/recursive-regular-expressions.html/comment-page-1#comment-2441</link>
		<dc:creator>rex</dc:creator>
		<pubDate>Wed, 13 Jan 2010 08:46:37 +0000</pubDate>
		<guid isPermaLink="false">http://iregex.org/?p=73#comment-2441</guid>
		<description>使用.Net语法解决上面的问题，是这样的：
(?:0(?))+(?:1(?))+(?(Z)(?!))</description>
		<content:encoded><![CDATA[<p>使用.Net语法解决上面的问题，是这样的：<br />
(?:0(?))+(?:1(?))+(?(Z)(?!))</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 外贸主机</title>
		<link>http://iregex.org/blog/recursive-regular-expressions.html/comment-page-1#comment-2160</link>
		<dc:creator>外贸主机</dc:creator>
		<pubDate>Fri, 25 Dec 2009 04:17:56 +0000</pubDate>
		<guid isPermaLink="false">http://iregex.org/?p=73#comment-2160</guid>
		<description>翻译得不错，我是看到你文章那个图片才进来的，很搞笑，这个发型好特别。进来才看到这是写递归的。。。</description>
		<content:encoded><![CDATA[<p>翻译得不错，我是看到你文章那个图片才进来的，很搞笑，这个发型好特别。进来才看到这是写递归的。。。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rex</title>
		<link>http://iregex.org/blog/recursive-regular-expressions.html/comment-page-1#comment-2115</link>
		<dc:creator>rex</dc:creator>
		<pubDate>Sun, 20 Dec 2009 15:34:34 +0000</pubDate>
		<guid isPermaLink="false">http://iregex.org/?p=73#comment-2115</guid>
		<description>here is my result under ubuntu 9.10 and perl 5.10: (please click the image for larger view)
&lt;a href=&quot;http://i293.photobucket.com/albums/mm60/zhasm/iregex/20091220_232947.png&quot; target=&quot;_blank&quot; title=&quot;[译]递归正则表达式&#124;我爱正则表达式&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://i293.photobucket.com/albums/mm60/zhasm/iregex/20091220_232947.png&quot; border=&quot;0&quot; alt=&quot;《我爱正则表达式》&#124;[译]递归正则表达式&quot;&gt;&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>here is my result under ubuntu 9.10 and perl 5.10: (please click the image for larger view)<br />
<a href="http://i293.photobucket.com/albums/mm60/zhasm/iregex/20091220_232947.png" target="_blank" title="[译]递归正则表达式|我爱正则表达式" rel="nofollow"><img src="http://i293.photobucket.com/albums/mm60/zhasm/iregex/20091220_232947.png" border="0" alt="《我爱正则表达式》|[译]递归正则表达式"/></a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rex</title>
		<link>http://iregex.org/blog/recursive-regular-expressions.html/comment-page-1#comment-2114</link>
		<dc:creator>rex</dc:creator>
		<pubDate>Sun, 20 Dec 2009 15:18:03 +0000</pubDate>
		<guid isPermaLink="false">http://iregex.org/?p=73#comment-2114</guid>
		<description>不是，这只是一篇文章。我翻译得比较慢（晚上业余时间），看起来像是翻译了一本书。</description>
		<content:encoded><![CDATA[<p>不是，这只是一篇文章。我翻译得比较慢（晚上业余时间），看起来像是翻译了一本书。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zhang</title>
		<link>http://iregex.org/blog/recursive-regular-expressions.html/comment-page-1#comment-2111</link>
		<dc:creator>zhang</dc:creator>
		<pubDate>Sun, 20 Dec 2009 12:18:19 +0000</pubDate>
		<guid isPermaLink="false">http://iregex.org/?p=73#comment-2111</guid>
		<description>这是一本书吗？</description>
		<content:encoded><![CDATA[<p>这是一本书吗？</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 太阳照常升起</title>
		<link>http://iregex.org/blog/recursive-regular-expressions.html/comment-page-1#comment-2109</link>
		<dc:creator>太阳照常升起</dc:creator>
		<pubDate>Sun, 20 Dec 2009 11:36:58 +0000</pubDate>
		<guid isPermaLink="false">http://iregex.org/?p=73#comment-2109</guid>
		<description>and if I use windows activeperl to test this program,the maxmium value would be 11739</description>
		<content:encoded><![CDATA[<p>and if I use windows activeperl to test this program,the maxmium value would be 11739</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 太阳照常升起</title>
		<link>http://iregex.org/blog/recursive-regular-expressions.html/comment-page-1#comment-2108</link>
		<dc:creator>太阳照常升起</dc:creator>
		<pubDate>Sun, 20 Dec 2009 11:30:10 +0000</pubDate>
		<guid isPermaLink="false">http://iregex.org/?p=73#comment-2108</guid>
		<description>$str = &quot;0&quot;x681 . &quot;1&quot;x681;
$regex = qr/0(??{$regex})*1/;
 
if ($str =~ /^$regex$/) {
  print &quot;yes, it matches&quot;;
}
else {
  print &quot;no, it doesn&#039;t match&quot;;
}


here&#039;s something wierd to me,I cannot help talking about it.noticing that I use the value 681 for the match depth,if I try the depth for 682,there will be nothing printed to the console,and I tried lots of numbers,and the maximum depth value would be  681,I use windows cygwin for testing this program.</description>
		<content:encoded><![CDATA[<p>$str = &#8220;0&#8243;x681 . &#8220;1&#8243;x681;<br />
$regex = qr/0(??{$regex})*1/;</p>
<p>if ($str =~ /^$regex$/) {<br />
  print &#8220;yes, it matches&#8221;;<br />
}<br />
else {<br />
  print &#8220;no, it doesn&#8217;t match&#8221;;<br />
}</p>
<p>here&#8217;s something wierd to me,I cannot help talking about it.noticing that I use the value 681 for the match depth,if I try the depth for 682,there will be nothing printed to the console,and I tried lots of numbers,and the maximum depth value would be  681,I use windows cygwin for testing this program.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

