Thanks, friend.
I am trying to enable all the different types of urls to be clickable links, including the urls wrapped in text. Got this following expression that confused me, and when testing it does break as well. I am trying to fully understand it before modify.
$text = eregi_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\" target=\"_blank\" title=\"\\0\">\\0</a>", $text);
1. why the alpha is inside double square bracket [[:alpha:]],instead just one [:alpha:], is it trying to make a balance with the :space: and :alnum:, but no other meannings?
2. [^<>[:space:]]+ matches for not(^) a left arrow(<) or right arrow(>) or a single space[:space:], not one or more of them should appear at that position at all. am i right?
3. the backreference refers to the match inside the round bracket, not square bracket, is it?
4. even if backreference can count with square brackets, it starts from 1, not 0, what does the 0 refer to here?
Thanks very much!