regex - Grails: How to remove any and all HTML tags from a String -


what simple, fast , reliable way remove , html tags text string in grails?

this first removes comments (which might contain tags) , tags:

text = text.replaceall(/<!--.*?-->/, '').replaceall(/<.*?>/, '') 

(via http://grails.1312388.n4.nabble.com/strip-html-tags-tp1316579p1316580.html)


Comments

Popular posts from this blog

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -