preg_replace正则匹配,去除所有a链接地址,并且保留里面a里面的内容
preg_replace(“#<a[^>]*>(.*?)</a>#is”, “$1”,$body);
ereg_replace正则匹配:
ereg_replace(“]*>|</a>”,””,$content);
ereg_replace函数匹配以”<a “开头,中间除>以外的所有字符,再以>结尾的字符串或匹配””字符。匹配到的字符串赋为空。
preg_replace正则匹配,去除所有a链接地址,并且保留里面a里面的内容
preg_replace(“#<a[^>]*>(.*?)</a>#is”, “$1”,$body);
ereg_replace正则匹配:
ereg_replace(“]*>|</a>”,””,$content);
ereg_replace函数匹配以”<a “开头,中间除>以外的所有字符,再以>结尾的字符串或匹配””字符。匹配到的字符串赋为空。
Vultr Global Cloud Hosting – Brilliantly Fast SSD […]
Akamai(Linode)
Deploy more with Linux virtual machines, global infrast […]
Our web hosting is trusted by more than 2,800,000 domai […]
Hostinger – Bring Your Idea Online With a Website
选择您的网站托管解决方案,打造完美网站!从共享主机和域名到VPS – 我们拥有您网上成功所需的一切 […]
DigitalOcean – The developer cloud
Helping millions of developers easily build, test, mana […]
七牛云 | 一站式场景化智能视频云
2011 年成立以来,七牛云致力于成为全球领先的一站式场景化智能视频云服务商,围绕数字化浪潮下的在线音视频需求 […]
评论已关闭