Try ereg() instead.
for instance,
ereg("xxx(.*)xxx", $file, $out)
Note that you MUST now what should be replaced by xxx.
$file is not necessary, use $array([2] instead.
$out is an array, in this case your filename will be $out[1]
e.g.
if your line is <A HREF=subject1.txt>
ereg("<A HREF=(.*)>", $array[2], $out)
ThK