php parse links emails using -'php,regex'

php parse links emails  using -'php,regex'

I am wondering if there is a simple snippet which converts links of any kind: to <a href=""></a> to <a href=""></a> to <a href=""></a> to  to <a href=""></a>

I do not want to use any PHP5 specific library.

Thank you for your time.

UPDATE I have updated the above text to what i want to convert it to. Please note that the href tag and the text are different for case 2 and 3.

UPDATE2 Hows does gmail chat do it? Theirs is pretty smart and works only for real domains names. e.g. works but a.cb does not work.

asked Sep 7, 2015 by rajesh
0 votes

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.