<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Notes Log &#187; regular expression</title>
	<atom:link href="http://noteslog.com/tag/regular-expression/feed/" rel="self" type="application/rss+xml" />
	<link>http://noteslog.com</link>
	<description></description>
	<lastBuildDate>Sun, 05 Sep 2010 11:33:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to write a fast catch-all RegExp</title>
		<link>http://noteslog.com/post/how-to-write-a-fast-catch-all-regexp/</link>
		<comments>http://noteslog.com/post/how-to-write-a-fast-catch-all-regexp/#comments</comments>
		<pubDate>Sat, 17 May 2008 17:55:36 +0000</pubDate>
		<dc:creator>Andrea Ercolino</dc:creator>
				<category><![CDATA[Fixing]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[regular expression]]></category>

		<guid isPermaLink="false">http://noteslog.com/?p=208</guid>
		<description><![CDATA[In How to write a safe catch-all RegExp I suggested to use (?:\w&#124;\W)* for matching any character in a regular expression. It&#8217;s certainly true and safe, and the same stands for its siblings (?:\s&#124;\S)* and (?:\d&#124;\D)*. If you want to match a large text, these expressions are not the best. I&#8217;ve prepared a simple test [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://noteslog.com/post/how-to-write-a-safe-catch-all-regexp/" target="_self">How to write a safe catch-all RegExp</a> I suggested to use <strong><span style="color: #333399;">(?:\w|\W)*</span></strong> for matching any character in a regular expression. It&#8217;s certainly true and safe, and the same stands for its siblings <strong><span style="color: #333399;">(?:\s|\S)*</span></strong> and <strong><span style="color: #333399;">(?:\d|\D)*</span></strong>.</p>
<p>If you want to match a large text, these expressions are not the best. I&#8217;ve prepared a simple <a href="http://noteslog.com/personal/projects/regexp/test.html">test page</a> where the GeSHi&#8217;s engine file, which is almost 120KB, is going to be matched by the regular expression you input.</p>
<p>In Firefox 2 the performance is quite good, about 100 ms on my PC, but in Internet Explorer 7 it takes more than 7 minutes !!!</p>
<p>The best catch-all regular expression is <strong><span style="color: #333399;">[\w\W]*</span></strong>, which employs about 50 ms in FF2, and 0 ms in IE7 !!! (yes, zero milliseconds)</p>
]]></content:encoded>
			<wfw:commentRss>http://noteslog.com/post/how-to-write-a-fast-catch-all-regexp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
