Created
October 30, 2016 06:51
-
-
Save khanof89/14fc19d0b0fa0f2bc0f1811894906f8e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$text = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#!?&//=]+)', | |
'<a href="\\1" target="_blank">\\1</a>', $text); | |
$text = eregi_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#!?&//=]+)', | |
'\\1<a href="http://\\2" target="_blank">\\2</a>', $text); | |
$text = eregi_replace('([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3})', | |
'<a href="mailto:\\1">\\1</a>', $text); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment