Skip to content

Instantly share code, notes, and snippets.

@Macagare
Created November 2, 2012 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Macagare/3999337 to your computer and use it in GitHub Desktop.
Save Macagare/3999337 to your computer and use it in GitHub Desktop.
Coldfusion: strip tags from string
<cfsavecontent variable="str">
<html>
<body>
This is the text you want
</body>
</html>
</cfsavecontent>
<cfset textstr = REReplace(str,'<[^>]*>','','all')>
<cfoutput>
#textstr#
</cfoutput>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment