I am trying to get the content that I get back from a response. The content is within a div
tag, but when T try to run the regex I don't get anything when I display it. If I use a regex tester I get the content I want. Below is the code I am using:
var myString = "<div class="zdc-box zdc-error">
Unknown column 'order_numbe' in 'field list'
</div>"
var myRegexp = "/<div class=\"zdc-box zdc-error\">\s+(.*)\s+.*?</div>/";
var match = myRegexp.exec(myString);
alert(match[1]);
Can anybody help me and let m know what i am doing wrong?