$string = "这是php提取文本内容字符串中的网址,连接为https://www.111cn.net 站点";
//连接后需要有个空格或回车。
$string = eregi_replace("http://**([*^ ,\r\n]*)","",$string); $string = eregi_replace("ftp://([^ ,\r\n]*)","",$string);
例子1
$str='这样的https://www.111cn.net/ play/?id=1010&p=1_0-1试试!'; $pattern='/(http:\/\/|https:\/\/|ftp:\/\/)([\w:\/\.\?=&-_]+)/is'; $str=preg_replace($pattern, '', $str); echo $str; ?>
例子2
function autolink($foo) { $foo = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_/+.~#?&//=]+)', '/1', $foo); if( strpos($foo, "http") === FALSE ){ $foo = eregi_replace('(www.[-a-zA-Z0-9@:%_/+.~#?&//=]+)', '', $foo); }else{ $foo = eregi_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_/+.~#?&//=]+)', '/1', $foo); } return $foo; } ?>
暗黑破坏神4红门如何实现无限重置
Twitter网页版免登录体验-twitter网页直接访问
名将杀霍去病千里单骑最高难度怎么过
百战群英平民攻略怎么玩
photoshop网页版直达-photoshop在线版入口
acfun流鼻血版官网入口在哪-acfun流鼻血版官方网址一键直达
彩虹朋友幸存者
恐怖世界模拟
仓库寻宝
全能机甲内置MOD菜单
我开厂贼6
运输公司大亨
庄园建造师
猫岛日记
佩皮医院2025