I'm looking for regex to extract json string from text. I have the text below, which contains. My json:
[
{
"message": "(.*)",
"answer": " :с"
},
{
"message": "http:\/\/(.*)\.(.*)\/[\S\s]+\ ?",
"answer": "No!"
}
]
And php parse:
json_decode($json); //null
var_dump(json_last_error() == JSON_ERROR_SYNTAX); //true