Regular expression woes.

They have: 15 posts

Joined: Dec 2006

<?php
if (preg_match(\"/<body(.*)>(.*)<\/body>/i\",$val, $body))
{
    @
$page_contents = $body[2];
    @
$is_contents = true;
}
?>

To cut a long story short, I'm trying to grab everything between the body tags of a webpage. I'm still a novice when it comes to regular expressions.

That should work, right?