Minor note here, but over on CF-Talk, Rick Root just pointed out a flaw in my understanding of ColdFusion regular expressions. I was under the impression that the period "." would NOT match the new line character or the carriage return character in a target string. I think this is traditionally how regular expressions work (or maybe not). It turns out, that this is dead wrong. The "." character DOES match new lines and carriage returns. I am not sure if this changed in MX(?7) or if I just never learned in properly.
<cfsavecontent variable="strText"> <a href="http://www.google.com" target="_blank" >Google</a> </cfsavecontent> <!--- Replace tags. ---> #REReplaceNoCase( strText, "</?[a-z].*?>", "", "ALL" )#
Want to use code from this post? Check out the license.