Menu
I’m using the following to try and replace the body of an HTML page when I’m not sure what settings will be applied to the <body> tag, or what will be contained:
[code]$myString = preg_replace(“/<body.+</body>/i” , $newBodyTag , $pageString);
Based on the tutorial I’ve been reading, the dot followed by the plus should match any characters, in any amount, between <body> and </body>. The escaped slash shouldn’t interfere. However, after execution the $myString var contains the whole unaltered $pageString. Have I missed something?