Strip Html Tags
Join the DZone community and get the full member experience.Join For Free
Originally from segabor@textsnippets The regex below removes html tags from string (untested).
str = <
Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.htmlHTML_TEXT puts str.gsub(/<\/?[^>]*>/, "")
Opinions expressed by DZone contributors are their own.