Help with PCRE in PHP.?

Daniel

New member
I am new to PCRE in PHP and don't understand what the following pattern matches:

$ret = preg_replace("#(^|[\n ])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "<a href='' rel='nofollow'></a>", $ret);

$ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "<a href='http://' rel='nofollow'></a>", $ret);


Could someone please explain and link me to some good tuts. Thanks.
 
Back
Top