Tuesday, May 12, 2015

Replace backward slash \ in a string JAVA


To Replace a backward slash   \   in a JAVA string, use the following way:


String sample= "This is so fluffy\ I am gonna die\";

sample.replaceAll("\\\\", "new replacing characters");



1 comment:

  1. Best casino site 2021 - Lucky Club
    Check the list of best online luckyclub.live casino sites in the UK with Lucky Club. Enjoy the best bonuses, fast payouts, and other features. Join our  Rating: 4.6 · ‎12 votes

    ReplyDelete