<?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/"
xmlns:series="http://unfoldingneurons.com/"
> <channel><title>Comments on: Get the Intro: PHP Paragraph Regular&#160;Expression</title> <atom:link href="http://davidwalsh.name/php-paragraph-regular-expression/feed" rel="self" type="application/rss+xml" /><link>http://davidwalsh.name/php-paragraph-regular-expression</link> <description>Legendary scribbles about JavaScript, HTML5, AJAX, PHP, CSS, and ∞.</description> <lastBuildDate>Thu, 09 Feb 2012 15:40:33 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3</generator> <item><title>By: Bips</title><link>http://davidwalsh.name/php-paragraph-regular-expression/comment-page-1#comment-27604</link> <dc:creator>Bips</dc:creator> <pubDate>Wed, 16 Nov 2011 07:20:25 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3176#comment-27604</guid> <description>Could you please help me to preg match two or more paragraph,I mean all the paragraph from the $post[&#039;post_content&#039;]</description> <content:encoded><![CDATA[<p>Could you please help me to preg match two or more paragraph,I mean all the paragraph from the $post['post_content']</p> ]]></content:encoded> </item> <item><title>By: webveins.in</title><link>http://davidwalsh.name/php-paragraph-regular-expression/comment-page-1#comment-27144</link> <dc:creator>webveins.in</dc:creator> <pubDate>Thu, 06 Oct 2011 09:10:37 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3176#comment-27144</guid> <description>Hi,
I&#039;m in a trouble with php paragraph replace. I&#039;ve following para&lt;code&gt;{tab=Sed facilisis consequat libero}Fusce eu ligula purus, eu ultricies nisl.Fusce eu ligula purus, eu ultricies nisl. Curabitur sed leo felis. {/tab}{tab=Curabitur ultricies sapien}Sed facilisis consequat libero, at tincidunt neque tristique vitae. {/tab}&lt;/code&gt;my aim is to replace &lt;code&gt;{tab=name}something{/tab}&lt;/code&gt; to &lt;code&gt;something&lt;/code&gt;Reg exp. i&#039;m using is: &lt;code&gt;/({tab.+?})(.*\S)({\/tab})/s&lt;/code&gt;Its working fine with single line or para. but not with multiline.Can anybody suggest how to fix it.
Thanks in Advance...</description> <content:encoded><![CDATA[<p>Hi,<br
/> I&#8217;m in a trouble with php paragraph replace. I&#8217;ve following para</p><p><code>{tab=Sed facilisis consequat libero}Fusce eu ligula purus, eu ultricies nisl.</p><p>Fusce eu ligula purus, eu ultricies nisl. Curabitur sed leo felis. {/tab}</p><p>{tab=Curabitur ultricies sapien}Sed facilisis consequat libero, at tincidunt neque tristique vitae. {/tab}</code></p><p>my aim is to replace <code>{tab=name}something{/tab}</code> to <code>something</code></p><p>Reg exp. i&#8217;m using is: <code>/({tab.+?})(.*\S)({\/tab})/s</code></p><p>Its working fine with single line or para. but not with multiline.</p><p>Can anybody suggest how to fix it.<br
/> Thanks in Advance&#8230;</p> ]]></content:encoded> </item> <item><title>By: Rich</title><link>http://davidwalsh.name/php-paragraph-regular-expression/comment-page-1#comment-26369</link> <dc:creator>Rich</dc:creator> <pubDate>Fri, 05 Aug 2011 15:33:36 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3176#comment-26369</guid> <description>This worked like a champ, but lets say I wanted to get the rest of the content now, minus the intro paragraph?  how would I go about doing that?  for example. i want to show the intro paragraph using your code, then create a div that would enclose the rest of the actual content that I would be able to toggle through a read more link.</description> <content:encoded><![CDATA[<p>This worked like a champ, but lets say I wanted to get the rest of the content now, minus the intro paragraph?  how would I go about doing that?  for example. i want to show the intro paragraph using your code, then create a div that would enclose the rest of the actual content that I would be able to toggle through a read more link.</p> ]]></content:encoded> </item> <item><title>By: Jason</title><link>http://davidwalsh.name/php-paragraph-regular-expression/comment-page-1#comment-24318</link> <dc:creator>Jason</dc:creator> <pubDate>Mon, 06 Jun 2011 01:45:21 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3176#comment-24318</guid> <description>nice idea, but how do I add the code? how if i just paste it after the_title ? is it works if i do that?</description> <content:encoded><![CDATA[<p>nice idea, but how do I add the code? how if i just paste it after the_title ? is it works if i do that?</p> ]]></content:encoded> </item> <item><title>By: Hugo</title><link>http://davidwalsh.name/php-paragraph-regular-expression/comment-page-1#comment-20896</link> <dc:creator>Hugo</dc:creator> <pubDate>Tue, 05 Oct 2010 22:32:30 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3176#comment-20896</guid> <description>What does this code actually do? Is there any way to style the first paragraph by separating it first in PHP, then using CSS?</description> <content:encoded><![CDATA[<p>What does this code actually do? Is there any way to style the first paragraph by separating it first in PHP, then using CSS?</p> ]]></content:encoded> </item> <item><title>By: Cautious User</title><link>http://davidwalsh.name/php-paragraph-regular-expression/comment-page-1#comment-19665</link> <dc:creator>Cautious User</dc:creator> <pubDate>Fri, 03 Sep 2010 02:42:08 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3176#comment-19665</guid> <description>Slight correction to Grouchy Smurf&#039;s regex:$pattern = &quot;#]*&gt;(.*?)#is&quot;;</description> <content:encoded><![CDATA[<p>Slight correction to Grouchy Smurf&#8217;s regex:</p><p>$pattern = &#8220;#]*&gt;(.*?)#is&#8221;;</p> ]]></content:encoded> </item> <item><title>By: Marcus</title><link>http://davidwalsh.name/php-paragraph-regular-expression/comment-page-1#comment-11063</link> <dc:creator>Marcus</dc:creator> <pubDate>Thu, 06 Aug 2009 08:12:18 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3176#comment-11063</guid> <description>David, are you doing this from within wordpress via a plugin or something, or outside wordpress and just accessing the database?If the first one there are better ways of doing it by using the WP functions, like the&#095;excerpt&#095;rss()...</description> <content:encoded><![CDATA[<p>David, are you doing this from within wordpress via a plugin or something, or outside wordpress and just accessing the database?</p><p>If the first one there are better ways of doing it by using the WP functions, like the&#95;excerpt&#95;rss()&#8230;</p> ]]></content:encoded> </item> <item><title>By: Grouchy Smurf</title><link>http://davidwalsh.name/php-paragraph-regular-expression/comment-page-1#comment-10928</link> <dc:creator>Grouchy Smurf</dc:creator> <pubDate>Fri, 31 Jul 2009 19:37:09 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3176#comment-10928</guid> <description>Has one of you ever read &lt;a href=&quot;http://fr.php.net/manual/en/reference.pcre.pattern.modifiers.php&quot; rel=&quot;nofollow&quot;&gt;the doc&lt;/a&gt; ?preg&#095;match(&#039;#&lt;p[^&gt;]*&gt;(.*)&lt;/p&gt;#isU&#039;, $post[&#039;post&#095;content&#039;], $matches);The &quot;i&quot; modifier allow paragraph tag name to be lower case or upper case. The &quot;s&quot; modifier allow dot metacharacter to match all characters, including newlines. The &quot;U&quot; modifier make pattern really matching only the first paragraph instead of everything between the first p end the last p. Using the &quot;#&quot; delimiter for your pattern make it more readable when dealing with HTML tags and using single quote to declare the pattern string don&#039;t start PHP automatic search for somes vars to replace.</description> <content:encoded><![CDATA[<p>Has one of you ever read <a
href="http://fr.php.net/manual/en/reference.pcre.pattern.modifiers.php" rel="nofollow">the doc</a> ?</p><p>preg&#95;match(&#8216;#&lt;p[^&gt;]*&gt;(.*)&lt;/p&gt;#isU&#8217;, $post['post&#95;content'], $matches);</p><p>The &#8220;i&#8221; modifier allow paragraph tag name to be lower case or upper case. The &#8220;s&#8221; modifier allow dot metacharacter to match all characters, including newlines. The &#8220;U&#8221; modifier make pattern really matching only the first paragraph instead of everything between the first p end the last p. Using the &#8220;#&#8221; delimiter for your pattern make it more readable when dealing with HTML tags and using single quote to declare the pattern string don&#8217;t start PHP automatic search for somes vars to replace.</p> ]]></content:encoded> </item> <item><title>By: Matt</title><link>http://davidwalsh.name/php-paragraph-regular-expression/comment-page-1#comment-10918</link> <dc:creator>Matt</dc:creator> <pubDate>Fri, 31 Jul 2009 15:17:49 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3176#comment-10918</guid> <description>@Jeremy, that&#039;s it! i knew i was forgetting something.</description> <content:encoded><![CDATA[<p>@Jeremy, that&#8217;s it! i knew i was forgetting something.</p> ]]></content:encoded> </item> <item><title>By: Jeremy Parrish</title><link>http://davidwalsh.name/php-paragraph-regular-expression/comment-page-1#comment-10914</link> <dc:creator>Jeremy Parrish</dc:creator> <pubDate>Fri, 31 Jul 2009 14:35:09 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3176#comment-10914</guid> <description>@Matt, you probably meant:preg&#095;match(”/&lt;p[^&gt;]*&gt;(.*)&lt;\/p&gt;/is”,$post[&#039;post&#095;content&#039;],$matches);Otherwise, it would match everything between the first &lt;p&gt; tag and the last &lt;/p&gt;</description> <content:encoded><![CDATA[<p>@Matt, you probably meant:</p><p>preg&#95;match(”/&lt;p[^&gt;]*&gt;(.*)&lt;\/p&gt;/is”,$post['post&#95;content'],$matches);</p><p>Otherwise, it would match everything between the first &lt;p&gt; tag and the last &lt;/p&gt;</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching using disk: basic
Object Caching 865/866 objects using disk: basic

Served from: davidwalsh.name @ 2012-02-09 10:53:46 -->
