I have the following code, and when I run it I get the error:
Warning: eregi() [function.eregi]: REG_BADRPT:trepetition-operator operand invalid
while ( eregi("(<TD align=CENTER BGCOLOR=#BBFFCC>.*?<\/TD>)", $String, $Regs) )
{
$String = str_replace($Regs[1].$Regs[2].$Regs[3], "", $String);
echo "horse: ".$Regs[1]."<br />\n";
}
I get the error because of the ".?" part in the middle of the eregi function call. Whats wrong with it?! http://gnosis.cx/publish/programming/regular_expressions.html says to use .? so its not greedy, so why do I get an error when I try to use it?
I hate regular expressions 🙁 Thanks for any help, its really appreciated.
~ Paul