6 Replies Latest reply on Jan 15, 2009 7:35 PM by 807589

    How to replace special characters by "" in Java ?

      Dear Java Community,

      I am calling one method which pulls the String object from database. (Contents of the String object is as mentioned below, ie the email contents)
      From : ABC
      To : XYZ
      Sent at : 01/14/2009 12:30 PM
      Approved by JKL

      Then using the replaceAll method, I am trying to replace "\n" and "\t" by "" but it is not working.

      MyString s = "Above content";

      Can some one help me ? Do I need to use      replaceAll(String regex, String replacement) ??

      Thanks in Advance