import org.apache.commons.lang.CharSetUtils;
public class MainClass {
public static void main(String[] args) {
//Removes specified character repetitions
System.out.println("Squeeze B and o = " +
CharSetUtils.squeeze("BBoooorisbbbecker", "Bo"));
}
}
Squeeze B and o = Borisbbbecker