Uwe... At a guess, I'd say that the * might be a little too aggressive.
Try a plus instead: <cfset textstr = REReplace(str,'<[^>]+>','','all')> andy -----Original Message----- From: Uwe Degenhardt [mailto:cf-t...@sdsolutions.de] Sent: Sunday, February 12, 2012 8:53 AM To: cf-talk Subject: strip off HTML Hi list, with this code I want to strip off HTML coding of the field: XYSHORTDESC of a mySQL-table-field. It doesn't really work, since it is giving back blank fields after running, and I don't know why. Does anybody have a clue why or have an idea which ColdFusion function I can take to strip off HTML ro run it properly ? Thanks. Uwe <CFQUERY NAME="GetData" datasource="1234" maxrows="10000"> Select ID,XYSHORTDESC FROM xyarticles </CFQUERY> <cfloop query="GetData" startrow="1" endrow="#GetData.recordcount#"> <cfsavecontent variable="str"> <cfoutput>#GetData.XYSHORTDESC#</cfoutput> </cfsavecontent> <cfset textstr = REReplace(str,'<[^>]*>','','all')> <CFSET textstr = LEFT(textstr,255)> <cfoutput> #textstr# </cfoutput> <CFQUERY NAME="UpdateData" datasource="1234" password="12345" username="frank"> update xyarticles set XYSHORTDESC = '#textstr#' where ID = '#GetData.ID#' </CFQUERY> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:349867 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm