Removing " \ " from String isn't working for me

DIRTY DAVE :

I'm trying to remove the slash " \ " from my ArrayList of Strings, however I'm not sure why it's not working for me.

Example of text:

{"{\"Type\":\"CALM\",\"Confidence\":57.199989318847656}","{\"Type\":\"HAPPY\",\"Confidence\":38.17924880981445}",

What am I doing incorrectly?

for(int i = 0; i < mListUploadedImages.size(); i++){
    String newEmotions = mListUploadedImages.get(i).getEmotions().replaceAll("\\'", "");
    mListUploadedImages.get(i).setEmotions(newEmotions);
}
Golam Mazid sajib :

You give extra one ' in "\\'". try with this;

String newEmotions = mListUploadedImages.get(i).getEmotions().replace("\\", "");

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=355418&siteId=1