JSOUP innerHTML , innerHTML:
Elements elements = doc.select('span');
for(Element e : elements) {
e.html( e.html().replaceAll("&","") );
}
, , . & , .
, , & - &. & HTML. , , , . , . !
:
// eliminate ampersand and all trailing numbers
e.html( e.html().replaceAll("&[0-9]*","") );
For more information on regular expressions, see Javadocs on the Regex pattern .
source
share