Removing HTML from a Java String
- by Mason
Is there a good way to remove HTML from a Java string? A simple regex like
replaceAll("\\<.*?>","")
will work, but things like
&
wont be converted correctly and non-HTML between the two angle brackets will be removed (ie the .*? in the regex will disappear).