I want to write a RegExp that converts something like this:
$mem = "
Hello world! http://www.helloworld.com\n
Hello world! ftp://ftp.server.com\n
Hello world www.helloworld.com"

how can I write a single regexp that converts $mem to this:
$mem = "
Hello world! <a
Hello world! <a href="ftp://ftp.server.com";>ftp://ftp.server.com</a>\n
Hello world <a

As you noticed that the second line didn't have the protocol specifier and
it took by default "http://"; and the ones that had a protocol specifier were
kept as is.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to