Skip to content Skip to sidebar Skip to footer

Regex To Remove Html Tags Including H1, H2

Right now I'm using String.replaceAll('\\<(.*?)\\>', ''); But it doesn't remove the '1' in

tags. Is there any way to do this without using a seperate me

Solution 1:

Try this

String.replaceAll("<[^>]*>", "");

Post a Comment for "Regex To Remove Html Tags Including H1, H2"