java string regexp replace

Solutions on MaxInterview for java string regexp replace by the best coders in the world

showing results for - "java string regexp replace"
Élise
04 Feb 2016
1String input = "abcd";
2Pattern p = Pattern.compile("regexp");
3String output = p.matcher(input).replaceAll("replacement");