Re: String.replaceAll(String regex, String replacement) question

Discussion in 'Java' started by Mladen Adamovic, Dec 4, 2003.

  1. I tried to replace all " with \".
    s=s.replaceAll("[\"]","\\\"");
    but it does nothing!! String remains the same!!!

    I tried then
    s=s.replaceAll("[\Q"\E]","\Q\"\E")
    but I got five sintax error?!?!?!?

    I'm using JDK 1.4.2_01.

    What's wrong?

    P.S. It was a typing error in first message I posted about this.
     
    Mladen Adamovic, Dec 4, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tony
    Replies:
    2
    Views:
    590
    Alan Moore
    Dec 4, 2003
  2. Mladen Adamovic
    Replies:
    3
    Views:
    14,686
    Mladen Adamovic
    Dec 5, 2003
  3. Replies:
    7
    Views:
    22,019
    Chris
    Apr 19, 2006
  4. Replies:
    6
    Views:
    49,344
    Bernd Klier
    May 29, 2006
  5. NickName

    Reg: replaceAll new question

    NickName, Oct 19, 2006, in forum: Java
    Replies:
    0
    Views:
    365
    NickName
    Oct 19, 2006
Loading...

Share This Page