Skip to content

Instantly share code, notes, and snippets.

@roulupen
Created December 12, 2012 17:56
Show Gist options
  • Save roulupen/4270054 to your computer and use it in GitHub Desktop.
Save roulupen/4270054 to your computer and use it in GitHub Desktop.
Extract Text from HTML Code in ColdFusion
<cfsavecontent variable="request.htmlString">
<div id="fb-root">&nbsp;</div>
<script>
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id))
return; js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=1234567890";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<p>
CF10 was originally referred to by the codename Zeus, after first being confirmed as coming by Adobe at Adobe MAX 2010, and during much of its prerelease period. It was also commonly referred to as "ColdFusion next" and "ColdFusion X" in blogs, on Twitter, etc., before Adobe finally confirmed it would be "ColdFusion 10". For much of 2010, ColdFusion Product Manager Adam Lehman toured the US setting up countless meetings with customers, developers, and user groups to formulate a master blueprint for the next feature set. In September 2010, he presented the plans to Adobe where they were given full support and approval by upper management.[4]
The first public beta of ColdFusion 10 was released via Adobe Labs on 17 February 2012.
</p>
</div>
</cfsavecontent>
<div style="width:500px">
<cfoutput>#reReplaceNoCase(request.htmlString, "<(script|style).*?</\1>|<.*?>","","ALL")#</cfoutput>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment