Skip to content

Instantly share code, notes, and snippets.

@MartinIngesen
Created December 17, 2014 23:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MartinIngesen/1427b74f23b9a8117532 to your computer and use it in GitHub Desktop.
Save MartinIngesen/1427b74f23b9a8117532 to your computer and use it in GitHub Desktop.
public class HTMLTagRemover{
public static void main(String []args){
String html = "<p>Hello <br> World!</p> <a href='google.com'>website</a>";
System.out.println(html.replaceAll("<([^>]+)>", ""));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment