Undefined offset most likely means that no results were found...
What variable were you using for the subject ($html_data in my example) ? Are you sure that variable is populated with the correct HTML page you're trying to grab?
EDIT: I see the problem now. In the above code, there is an EXTRA SPACE. It seems to be an error with the board. Note the extra space BEFORE the bold-faced character:
$pattern = "/(<!-- start grab here -->(.*?)<!-- ENd grab here --> )/is";
Remove that space, so that the > and ) are next to each other with no spaces in between and it should work fine.
Also, do you want to include the <!> tags in your output? If not, use $matches[2] instead of $matches[1].
If you want to use error checking, to make sure that it found a result, you could count the number of items in $matches since it will always be greater than 1 when a result is returned. Something like this:
if(count($matches) > 1) echo $matches[1]; else echo "Nothing to grab.";