Hi.
I'm trying to use ereg_replace to turn some text based hyperlinks into WML
code. WML is similar to HTML, except for mobile phones and very strict. That
means that there's some characters you can't use in certain places. Here's
my current code.
$string = eregi_replace(" ((http|https|rtsp)://[^[:space:]]+[[:alnum:]/])","
<a href=\"\\1\">\\1</a>", $string);
That almost works well enough, but I need to add some more conditions. The
output CANNOT contain the words:
& q u o t ;
& g t ;
& l t ;
(ignore the spaces). If it does find those things it should break off, just
like when it finds a space. So far attempts to add this in have been
completely fruitless. Help would be very much appreciated!
Rob