replace all in regex in java code example
Example 1: java string regexp replace
String input = "abcd";
Pattern p = Pattern.compile("regexp");
String output = p.matcher(input).replaceAll("replacement");
Example 2: how to replace all of one character with nothing in java
String meal = "Hambbburger";
String replaced = meal.replaceAll("b","");