Начните с <> and end с <> in java
String result = original.replaceAll("<>*.*<>", "<><>");
Mushy Marten
String result = original.replaceAll("<>*.*<>", "<><>");