emacs - elisp: insert a double quote without the backslash -


Here we are a classical, I'm trying to surround a word with double quotes, but this backslash Also inserts!

I do:

  (replace-regexp-in-string "[a-za-z0- 9] +:" (lambda (match) / Code>  

The results include backslashes! "one \" tw2o \ ": three"

My goal is to process it with json-read-through-string .

I do not think this is a problem printing in ielm Because json reads fail.

I have a working version that uses the same problem on temporary-buffer and again search-forward

Any help and explanation appreciated! Many thanks.

Edit : If I use the string (setq myjson "{ One: \ "1 \", two: \ "2 \"} ", my function works:

  (json-read-from-string (replace-regexp -in-string "[A-za-z0-9] +:" (lambda (match) (concat "\" "s-replace": "" "match" "\": ")) myjson))  

but the result is

  

I Removed the edits which claim that it works because it is still a pb.


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -