I am new to PCRE in PHP and understand the basic patterns however the ones below are a bit complex and I don't understand what the following pattern matches:
Could someone please explain and link me to some good tuts. Thanks.PHP Code:$ret = preg_replace("#(^|[\n ])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#... "<a href='' rel='nofollow'></a>", $ret);
$ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*... "<a href='http://' rel='nofollow'></a>", $ret);



Reply With Quote
I worked out the first one matches a url with :// in it and the second one matches a url with www. or ftp.

Bookmarks