Java: Remove full stop in string

后端 未结 5 1441
死守一世寂寞
死守一世寂寞 2021-01-18 23:34

I want to delete all the full stops ( . ) in a string.

Therefore I tried: inpt = inpt.replaceAll(\".\", \"\");, but instead of deleting only the full st

5条回答
  •  囚心锁ツ
    2021-01-19 00:10

    replaceAll use a regex, please use the following:

    inpt = inpt.replaceAll("\\.", "")
    

提交回复
热议问题