//Try this as the pattern:
$pat = '(<)(script)([[:space:]]+)(language)(=)([ \'\"])(php)([ \'\"])(>)';
//This breaks what you have into 9 seperate sections, where $match[7] will return the php part, which is what I assume you are looking for?
//Any of the above strings will work for the pattern I gave you.
$string = '<script language="php">';
//Perform the eregi() function, since it is case insensative.
eregi($p, $string, $match);
//echo what you want.
echo $match[7];
//Hope this helps
//Later - Brian