Sure, ereg() will do this quite easily:
if ( ereg( '<!--start-->(.*)<!--end-->', $string, $match))
{
$text{$FILE} = $match[1];
}
Or you can use eregi() if you really do need caseless matching.
Of course there's a PCRE way to do this also, but I tend to
view ereg() as a lowest-common-denominator and if it works
there, then that's what I use. If you're porting a bunch of
stuff from Perl, you will probably feel differently.