Answer the question
In order to leave comments, you need to log in
How to escape quotes inside quotes?
Hello!
I am parsing data from Instagram in Java. The json returned by instagram is invalid because sometimes in some fields with naming inside quotes there are also quotes that are not escaped, for example:
"full_name": "Агроусадьба "Марусина Хата "",
Should be:
"full_name": "Агроусадьба \"Марусина Хата\"",
Maybe someone came across how you can escape quotes inside quotes using a regular expression?
Answer the question
In order to leave comments, you need to log in
You can't do this with a regular. Since all sorts of fig cases are possible, for example:
"full_name": "Колхоз "Светлый путь", деревня Пролетарская", ...
"full_name": "Слева направо: "Москвич", "Волга", "Жигули"", ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question