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 - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -