Replace multiple characters in one replace call

前端 未结 15 2296
失恋的感觉
失恋的感觉 2020-11-22 17:24

Very simple little question, but I don\'t quite understand how to do it.

I need to replace every instance of \'_\' with a space, and every instance of \'#\' with no

15条回答
  •  伪装坚强ぢ
    2020-11-22 17:43

    I don't know if how much this will help but I wanted to remove and from my string

    so I used

    mystring.replace('',' ').replace('','');
    

    so basically if you want a limited number of character to be reduced and don't waste time this will be useful.

提交回复
热议问题