Over a million developers have joined DZone.

Strip Html Tags

·
Originally from segabor@textsnippets
The regex below removes html tags from string (untested).


str = <


  

Application error

Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html

HTML_TEXT puts str.gsub(/<\/?[^>]*>/, "")
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}