This is part of, some of my code :

$buffer = "<P> <A HREF=/quick_grab.jsp?psdomain=drunkstudent.co.uk&o=funmail>LINK</A></P>";

if ( eregi ("<A(.+)>(.+)</A>", $buffer, $regs)) {
$replace = sprintf ("
<FORM METHOD=post ACTION=main.php NAME=MidPageLink>
<INPUT TYPE=hidden NAME=URL VALUE="%s">
<INPUT TYPE=submit NAME=PageSubmit VALUE="%s">
</FORM>
",$regs[1] ,$regs[2]);

echo eregi_replace ("$regs[0]", "$replace" ,"$buffer");
}else {
echo ("$buffer");
}

The problem is that it does not like the "?" I think this may be something to do with it being a "ternary" operator.