How can i remove special character \"\\\" in the string below:
String x = { \"message\": { \"@content\": \"toom\" }, \"recipients\": \"[{\\\"
You must escape the backslash in the regex.
try
x.replaceAll("\\\\", "")
see JavaRegularExpressions: 3.6. Backslashes in Java