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 “开头,中间除>以外的所有字符,再以>结尾的字符串或匹配””字符。匹配到的字符串赋为空。
Helping millions of developers easily build, test, mana […]
腾讯云为数百万的企业和开发者提供安全稳定的云计算服务,涵盖云服务器、云数据库、云存储、视频与CDN、域名注册等 […]
Our web hosting is trusted by more than 2,800,000 domai […]
Vultr Global Cloud Hosting – Brilliantly Fast SSD […]
2011 年成立以来,七牛云致力于成为全球领先的一站式场景化智能视频云服务商,围绕数字化浪潮下的在线音视频需求 […]
Deploy more with Linux virtual machines, global infrast […]
评论已关闭