<cfsavecontent variable="myString"> <p>This is the opening paragraph.</p> <p></p> <p> </p> <p> </p> <p> </p> <p>This is the closing paragraph.</p> </cfsavecontent>
<cfdump var="#reReplaceNoCase( myString, '<p>([\s]|\ )*</p>', '', 'all' )#" /> On Mon, Jun 4, 2012 at 11:50 AM, Robert Harrison <[email protected] > wrote: > > ? No one know a method to strip empty paragraphs from a string? I'd like > to remove all occurrences of paragraphs that have no content - stuff like: > , <p></p> OR <p> </p> OR <p> </p> > > Any ideas? > > Thanks > > Robert Harrison > Director of Interactive Services > > Austin & Williams > Advertising I Branding I Digital I Direct > 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 > T 631.231.6600 X 119 F 631.434.7022 > http://www.austin-williams.com > > Blog: http://www.austin-williams.com/blog > Twitter: http://www.twitter.com/austin_williams > > > -----Original Message----- > From: Robert Harrison [mailto:[email protected]] > Sent: Monday, June 04, 2012 12:37 PM > To: cf-talk > Subject: RE: Get First Paragraph: Remove Empty Paragraphs > > > Getting close, no I'm trying to consider any empty paragraphs. Tried this: > > <cfset ExtractionString=ReplaceList(comment,"<p></p>,<p> > </p>,<p> </p>"," , , ")> > > But it does not work completely. > > How could I remove all paragraphs that are empty, or contain only blanks > or non-breaking spaces? > > > > Robert Harrison > Director of Interactive Services > > Austin & Williams > Advertising I Branding I Digital I Direct > 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 T 631.231.6600 X > 119 F 631.434.7022 http://www.austin-williams.com > > Blog: http://www.austin-williams.com/blog > Twitter: http://www.twitter.com/austin_williams > > > -----Original Message----- > From: Russ Michaels [mailto:[email protected]] > Sent: Monday, June 04, 2012 11:32 AM > To: cf-talk > Subject: Re: Get First Pa > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351447 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

