Reputation: 334
I want to remove everything between a html tag named "code" from a string named "answer". My code is as follows:
answer = answer.replaceAll("<code>*</code>","");
It is not working. Please help.
Upvotes: 1
Views: 52
answer = answer.replaceAll("(?s)<code>.*?</code>","");