28 Sep, 2009
Remove html tags from a string
Java
String html_stripped = html.replaceAll("\\<.*?\\>", "");
PHP
strip_tags($html); // built-in PHP function to strip HTML and PHP tags
Javascript
var html_stripped = html.replace(/(<.*?>)/ig,"");
Love what you've just read? Subscribe to our newsletter to receive tips, resources and special offers related to web development & design.
Hello! Welcome to Web development blog! My name is Ei Sabai and on this blog, I write about web development, mobile app development, latest web technologies and the likes. Read more 


Great Work ! Short And Sweet Keep Going
Thanks for this – very nice little piece of code and very muchly appreciated!
100% works