You have your arguments out of order, try:

(= (.replaceAll "a" "\"" "\\\"")
    (.replaceAll "\\a" "\"" "\\\""))

On Thu, Jan 21, 2010 at 2:40 PM, CuppoJava <patrickli_2...@hotmail.com>wrote:

> Hi,
> I'm trying to write a simple function to replace every " inside the
> string with \", but am having an extremely difficult time.
>
> Can someone enlighten me as to why the following is returning true?
>
> (= (.replaceAll "\"" "\\\"" "a")
>   (.replaceAll "\"" "\\\"" "\\a"))
>
> Thanks a lot
>  -Patrick
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com<clojure%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to