alertsystem.notification = {"msgId":"1","msgTitle":"Message","msgBody":"No new message.","msgLink":"","msgImage":""};
I am trying to match the values for of the follow variables in the code above. I have been using this pattern preg_match('#(\[\{.*?\}\])#s', $html, $match); up until last week then it stopped working.
Is there a way to include alertsystem.go = in the pattern so that I am sure to get a match?
You want
preg_match_alland then take a look at$matches[0]. Your regex could also be:#alertsystem\.notification\s*\=\s*\{.*?\}#isAdd parenthesis where appropriate to capture specific sections.