I have a regex which matches to a standard html structure:
<(.*)html(.*)>(.*)<head(.*)>(.*)</head>(.*)<body(.*)>(.*)<body(.*)>(.*)</body>
which works fine for my node.js / express / jade generated sites.
However, if I try to match the following website, I got no match:
<HTML><HEAD>
<TITLE>IPWEBS - 400 Bad Request</TITLE>
</HEAD>
<BODY><H2>400 Bad Request</H2>
<P>The request generated an error response.</P>
</BODY>
</HTML>
Any idea where I've gone wrong? Case sensitivity is not the problem , I've already checked that.
UPDATE: Still with the following updated regex no match:
/i<(.*)html(.*)>(.*)<head(.*)>(.*)</head>(.*)<body(.*)>(.*)</body>(.*)</html>
(Sorry, tested the new regex already, but during trial with upper case a did some copy/paste errors ;))
COMMENT: I just want to test basic availability and correct html structure with jasmine-node under node.js. I don´t want to parse the DOM or walk through. If anyone has a better idea i´m really happy for suggestions.