1' , $text); $text = eregi_replace('([[:space:]()[{}"/> 1' , $text); $text = eregi_replace('([[:space:]()[{}">
Home > Article > Backend Development > exmail.qq.com Use PHP to convert URL string into hyperlink URL or email
Copy code The code is as follows:
function makeClickableLinks($text) {
$text = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0- 9@:%_+.~#?&//=]+)', '1', $text);
$text = eregi_replace('([ [:space:]()[{}])(www.[-a-zA-Z0-9@:%_+.~#?&//=]+)','12', $text);
$text = eregi_replace('([_.0-9a-z-]+@([0-9a-z][0-9a -z-]+.)+[a-z]{2,3})', '1', $text);
return $text;
}
The above has introduced the use of PHP to convert exmail.qq.com URL string into a hyperlink URL or email, including the content of exmail.qq.com. I hope it will be helpful to friends who are interested in PHP tutorials.