Java síce nie je moja šálka kávy, ale ak by som nemohol použiť regulárne výrazy, nerobil by som to po písmenkách:
private String clean (String text)
{
String result = null;
if (text != null)
{
int pos = 0;
int ampPos = -1;
boolean inside = false;
StringBuilder temp = new StringBuilder (text.length ());
while ((ampPos = text.indexOf ('&', pos = ampPos + 1)) != -1)
if (inside = !inside)
temp.append (text.substring (pos, ampPos));
result = temp.append (text.substring (pos)).toString ();
}
return result;
}