regex replace html code example
Example 1: regex remove html tags
const s = "<h1>Remove all <b>html tags</n></h1>"
s.replace(new RegExp('<[^>]*>', 'g'), '')
Example 2: regex remove html tags
String target = someString.replaceAll("<[^>]*>", "");
const s = "<h1>Remove all <b>html tags</n></h1>"
s.replace(new RegExp('<[^>]*>', 'g'), '')
String target = someString.replaceAll("<[^>]*>", "");