<?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: Getting Started with PHP Regular Expressions</title> <atom:link href="http://www.noupe.com/php/php-regular-expressions.html/feed" rel="self" type="application/rss+xml" /><link>http://www.noupe.com/php/php-regular-expressions.html</link> <description>Web Designer&#039;s Online Resource</description> <lastBuildDate>Fri, 12 Mar 2010 18:23:15 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.8.6</generator> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>By: Hans Lee</title><link>http://www.noupe.com/php/php-regular-expressions.html/comment-page-1#comment-85047</link> <dc:creator>Hans Lee</dc:creator> <pubDate>Fri, 19 Feb 2010 06:04:55 +0000</pubDate> <guid isPermaLink="false">http://www.noupe.com/?p=21096#comment-85047</guid> <description>You could test your regexp in the PHP regexp tester.http://www.pagecolumn.com/tool/pregtest.htmThe regexp should be /(\w+)\s(\1)/</description> <content:encoded><![CDATA[<p>You could test your regexp in the PHP regexp tester.</p><p><a href="http://www.pagecolumn.com/tool/pregtest.htm" rel="nofollow">http://www.pagecolumn.com/tool/pregtest.htm</a></p><p>The regexp should be<br /> /(\w+)\s(\1)/</p> ]]></content:encoded> </item> <item><title>By: Kian Ann</title><link>http://www.noupe.com/php/php-regular-expressions.html/comment-page-1#comment-78700</link> <dc:creator>Kian Ann</dc:creator> <pubDate>Tue, 02 Feb 2010 01:24:52 +0000</pubDate> <guid isPermaLink="false">http://www.noupe.com/?p=21096#comment-78700</guid> <description>Further to my confusion, I&#039;ve went to test the replace duplicate words regex out and it doesn&#039;t work... at least not for me.return preg_replace(”/s(w+s)1/i”, “$1?, $text);I went around doing some searches and ended up asking a friend.  This works to replace duplicate words:return preg_replace(&quot;/(\w+)\s(\\1)/&quot;, &quot;$1&quot;, &quot;Oh this this is good&quot;); // returns &quot;Oh this is good&quot;But this replaces only 1 duplicate word.  If the text was &quot;Oh this this this is good&quot;, then it will not replace 3 copies of the words at once - you&#039;ll have to do an iteration (or recursion)... whatever u call it.</description> <content:encoded><![CDATA[<p>Further to my confusion, I&#8217;ve went to test the replace duplicate words regex out and it doesn&#8217;t work&#8230; at least not for me.</p><p>return preg_replace(”/s(w+s)1/i”, “$1?, $text);</p><p>I went around doing some searches and ended up asking a friend.  This works to replace duplicate words:</p><p>return preg_replace(&#8221;/(\w+)\s(\\1)/&#8221;, &#8220;$1&#8243;, &#8220;Oh this this is good&#8221;);<br /> // returns &#8220;Oh this is good&#8221;</p><p>But this replaces only 1 duplicate word.  If the text was &#8220;Oh this this this is good&#8221;, then it will not replace 3 copies of the words at once &#8211; you&#8217;ll have to do an iteration (or recursion)&#8230; whatever u call it.</p> ]]></content:encoded> </item> <item><title>By: Kian Ann</title><link>http://www.noupe.com/php/php-regular-expressions.html/comment-page-1#comment-78630</link> <dc:creator>Kian Ann</dc:creator> <pubDate>Mon, 01 Feb 2010 18:05:56 +0000</pubDate> <guid isPermaLink="false">http://www.noupe.com/?p=21096#comment-78630</guid> <description>This is a great tutorial! But I don&#039;t get the remove duplicate words thing?return preg_replace(&quot;/s(w+s)1/i&quot;, &quot;$1&quot;, $text);I&#039;d assume the text is &quot;this this&quot;, and we &quot;/s(w+s)1/i&quot; is aupposed to match &quot;this this&quot; and replace with &quot;this&quot;?Does the second part &quot;$1&quot; refers to the (w+s) group?  How do we match two identical words?</description> <content:encoded><![CDATA[<p>This is a great tutorial! But I don&#8217;t get the remove duplicate words thing?</p><p>return preg_replace(&#8221;/s(w+s)1/i&#8221;, &#8220;$1&#8243;, $text);</p><p>I&#8217;d assume the text is &#8220;this this&#8221;, and we &#8220;/s(w+s)1/i&#8221; is aupposed to match &#8220;this this&#8221; and replace with &#8220;this&#8221;?</p><p>Does the second part &#8220;$1&#8243; refers to the (w+s) group?  How do we match two identical words?</p> ]]></content:encoded> </item> <item><title>By: Some links for light reading (25/8/09) &#171; Max Design</title><link>http://www.noupe.com/php/php-regular-expressions.html/comment-page-1#comment-72916</link> <dc:creator>Some links for light reading (25/8/09) &#171; Max Design</dc:creator> <pubDate>Tue, 05 Jan 2010 13:35:01 +0000</pubDate> <guid isPermaLink="false">http://www.noupe.com/?p=21096#comment-72916</guid> <description>[...] Getting Started with PHP Regular Expressions  [...]</description> <content:encoded><![CDATA[<p>[...] Getting Started with PHP Regular Expressions  [...]</p> ]]></content:encoded> </item> <item><title>By: krisha</title><link>http://www.noupe.com/php/php-regular-expressions.html/comment-page-1#comment-64812</link> <dc:creator>krisha</dc:creator> <pubDate>Wed, 25 Nov 2009 15:05:27 +0000</pubDate> <guid isPermaLink="false">http://www.noupe.com/?p=21096#comment-64812</guid> <description>good tutorial i improved my knowledge</description> <content:encoded><![CDATA[<p>good tutorial i improved my knowledge</p> ]]></content:encoded> </item> </channel> </rss>
<!-- This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using memcached
Page Caching using memcached (user agent is rejected)
Database Caching 4/13 queries in 0.049 seconds using memcached
Content Delivery Network via media.smashingmagazine.com/cdn_noupe (user agent is rejected)

Served from: ip-10-227-50-15.eu-west-1.compute.internal @ 2010-03-12 18:31:09 -->