0

I'm trying to replace all single quotation marks with double quotation marks in Clojure. i.e. if the string id " 'name' " I want it to become " "name" ". How can I do that?

I've been trying to use the replace function like this:

(clojure.string/replace " 'The color is red' " #"'" """)

but it is not working.

1 Answer 1

2

You've forgotten to escape the double quotation mark

(clojure.string/replace " 'The color is red' " #"'" "\"")
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.