Snippets

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,"");

Are you a developer? Want to get a promotion, work on interesting projects, land a high paying job at a tech company or stand out from the crowd?

Then this ebook is for you!

Career Guide for Software Developers

Career Guide for Software Developers

3 thoughts on “Remove html tags from a string

Comments are closed.

Career Guide for Software Developers