How to convert this code into java code
$response = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $response);
I try this
String jsonStr = "Some Json string";
jsonStr.replaceAll("/[\x00-\x1F\x80-\xFF]/", "");
But it show an error
Invalid escape sequence (valid ones are \b \t \n \f \r \" \' \\ )