$v="the post with the link";
$v = eregi_replace("( |^)((http|telnet|https|ftp)://(([a-zA-Z0-9&\.\-]{3,})(\.[a-zA-Z]{2,4}))(/([a-zA-Z0-9\.&~\?=#_\-\\%]*))*)", " <a href=\"\\2\" target=\"_blank\">\\2</a>", $v);
hi, I am trying to let a link in a post to be made in to a clickable link by this code above. I copied this code from some script, it seemed to bee working, but the real thing is I DO NOT understand how it works. I read the regex(7) doc but uit still makes litlle sence to me.
google doesnt tell me much about regex :S, the manual has the regex(7) doc but I dont fully understand it
works, but it does a strange thing:
you see, when I have a link:
http//www.thissitedoesnotexist.net/index.php?lid=200&return=null
the code somehow makes the link only until the & and then adds a ; and then rest of the link follow noneclickable
i have looked over the code for days but I just cant get it to work :S
can anyone help me with this?
thanks 🙂