You don't actually need a regex to put this into one easily read line: replaceList(trim(finalDesription), '<br>,<p></p>,<p>,</p>', '<br />,<br /><br />,<br /><br />,')
... Or some derivative there of. Performance may differ slightly in favour of one way or another, but as much as I love regexs and I use them frequently, they're rarely easy to descipher at a glance. Gabriel -----Original Message----- From: Tony Bentley [mailto:[email protected]] Sent: Friday, 14 August 2009 5:59 AM To: cf-talk Subject: Re: Regex Help - Can this be simplified? You're better off using regex-replace(){rereplace()} over replace() for more than one condition. The pipe is a way to cheat the replace function but for future string searching or replacing functions, try regex and you can even test it online here: http://www.cftopper.com/contentfiles/tools/regularExpTester.cfm >There ya go. :) Just found out you can use the pipe "|" as well. > >rereplace(string,"(<p>)+(</p>)","<br>","all") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325447 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

