[{"user_id": 21387, "stars": [], "topic_id": 45644, "date_created": 1316697561.9109631, "message": "i'm retrieving some data from websites (data crawling) and, randomly, some of the entries come with some sort of escaping using quotes. \"text comes \"\"this\"\" way\". i don't know this kind of escaping, and i'm wondering if there's a standard way to get rid of it.", "group_id": 292, "id": 2188686}, {"user_id": 21387, "stars": [], "topic_id": 45644, "date_created": 1316697643.3456669, "message": "as far as i see, ``.replace('\"\"', '\"').strip('\"')`` could solve my problem, but still i'm unsafe; i don't know if this kind of escaping could be completely unescaped through such code.", "group_id": 292, "id": 2188689}, {"user_id": 21093, "stars": [], "topic_id": 45644, "date_created": 1316699488.3584099, "message": "It really depends on whether other text might be in there like \"text comes\"something\"this way\" or whatever. I don't think this is standard, in any case. Sometimes ''.split('\"\"') or similar can be useful in cases like this -- the general approach of using split, then operating on the output, then using join is certainly faster than going character by character if you can't do it with a replace().", "group_id": 292, "id": 2188792}, {"user_id": 21387, "stars": [], "topic_id": 45644, "date_created": 1316700219.3201201, "message": "yea. in that case, while i expect `text comes \"this\" way`, i get `\"text comes \"\"this\"\" way\"` instead.", "group_id": 292, "id": 2188840}, {"user_id": 21387, "stars": [], "topic_id": 45644, "date_created": 1316700275.9479051, "message": "actually, I think I saw that escaping in a database a while ago; not sure if it was mysql or sqlite. I think I could check it and see what I can do safely.", "group_id": 292, "id": 2188848}, {"user_id": 21387, "stars": [], "topic_id": 45644, "date_created": 1316700441.9893839, "message": "hm. \"A string constant is formed by enclosing the string in single quotes ('). A single quote within the string can be encoded by putting two single quotes in a row - as in Pascal.\" @ http://www.sqlite.org/lang_expr.html", "group_id": 292, "id": 2188868}, {"user_id": 21093, "stars": [], "topic_id": 45644, "date_created": 1316781676.7573509, "message": "So converting \"\" -> \" may be the thing to do when you know it's a string literal (and possibly pruning the leading/trailing \"'s as well)", "group_id": 292, "id": 2196116}]