String text
System.out.println(text);
こんな風貌もあります
So the traveller sat down by the side of that old man,
face to face with the serene sunset;
and all his friends came softly back and stood around him.
別String subText
System.out.println(subText);
上記の文字列の一部であり、次のようになります
So the traveller sat down by the side of that old man,
face to face with the serene sunset;
subText
この部分を取り除く必要がありますtext = text.replaceAll(subtext, "");
が、これはテキストには影響しませんか?