All of the code samples have now been consolidated and moved to my blog at http://house9.blogspot.com/. Many google searches still point here so I am leaving this blog operational.

Wednesday, January 6, 2010

Ruby Regex to remove script tags

# remove all script tags
html_content = html_content.gsub(/<script.*?>[\s\S]*<\/script>/i, "")

Resources

No comments:

Custom Search
< ... back