I need to replace all kinds of string that look like {\'\i}
by just i
I've already read Java String ReplaceAll method giving illegal repetition error?
So I tried
String word = "something{\\\'\\\i}".replaceAll("\\\\{\\\'\\\i}", "DONE");
but it doesn't work, could anyone help me please?
replaceAll
expects regular expressions. Instead of trying to get the RegEx right, use replace
.
String word = "something{\\'\\i}".replace("{\\'\\i}", "DONE");