On 03/05/2024 19:06, Ihor Radchenko wrote: > Max Nikulin writes: > >> What I do not like in `org-babel-read' is false positive for escaped >> quote when actually backslash is escaped: >> >> (org-babel-read "\"1\\\\\" 2 \\\\\"3\"" t) >> "1\\" > > Fixed, on main. > https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=2028bb15c I have no idea if "other\n\"string\"\nlines" may be passed `org-babel-read', but it is not discarded by the current regexp: "^[[:space:]]*\"\\(.*\\)\"[[:space:]]*$" Is there a reason why it is necessary to call `read' twice on the same content? From my point of view, result of first call may be returned. Does `read' have other role than unescaping backslash-protected characters? Likely it can be done by `replace-regexp-in-string', see the attachment. I have tried regexp on the following string: (let ((cases '(("" . nil) ("\"" . nil) ("\"\"" . t) ("\"\\\"" . nil) ("\"\\\\\"" . t) ("a" . nil) ("\"a\"" . t) ("\\\"a\\\"" . nil) ("\\\"a\\\\\"" . nil) ("\"a\\\"\"" . t) ("\"aa\\\"bb\"" . t) (" \"aa( bb\"" . t))))