How to remove “ ” from java string

后端 未结 9 1559
遥遥无期
遥遥无期 2020-12-17 07:31

I have a java string with \" \" from a text file the program accesses with a Buffered Reader object. I have tried string.replaceAll(\" 

9条回答
  •  暖寄归人
    2020-12-17 08:06

    This is a two step process:

    strLineApp = strLineApp.replaceAll("&"+"nbsp;", " "); 
    strLineApp = strLineApp.replaceAll(String.valueOf((char) 160), " ");
    

    This worked for me. Hope it helps you too!

提交回复
热议问题