php正则替换怎样把 href=http://24356>替换成href=http://24356.xxx.com> php正则替换怎样把 href=http://24356>替换成href=http://24356.xxx.com> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 是固定格式吗?固定格式怎么不用str_replace('http://24356', 'http://24356.xxx.com', $content);如果非固定格式preg_repalce('href="?http://([^/".]+)"?', 'href="http://$1.xxx.com"', $content); 是变动的 ,不过你的这个用不了 提示错误Delimiter must not be alphanumeric or backslash preg_repalce 这个拼写更正后测试的 如果后面的xxx是固定的那么就只要在后面用.连接上域名就可以了啊何必用正则呢? preg_repalce('#href="?http://([^/".]+)"?#i', 'href="http://$1.xxx.com"', $content);需要加一个正则分割符号,我以为你知道呢 $str = 'php正则替换怎样fdsfds把 href=http://24356>fsdfdsfd>sfds';$str2 = preg_replace('/href=http:\/\/(.*?)>/i', "href=http://$1.xxx.com>", $str); php总是报错,大家帮我看下代码 求一个完善的PHP上传类 PHP使用SNMP相关函数的问题 我把文件夹的名字改成了“第一章”之后,以前文件夹名字叫“2” mysql_num_rows()函数 数组合并 如何实现一个上传的问题!!! 跪求PHP+SMARTY 三级分类的方法 分全给了。在线等 急 请问高手,关于php连接数据库的问题 请问下配置里写上 require not ip 以后, apache 启动就失败 小白问题怎么调用php.... 这段代码最后的结果是多少?
固定格式怎么不用str_replace('http://24356', 'http://24356.xxx.com', $content);如果非固定格式preg_repalce('href="?http://([^/".]+)"?', 'href="http://$1.xxx.com"', $content);
是变动的 ,不过你的这个用不了 提示错误Delimiter must not be alphanumeric or backslash
preg_repalce 这个拼写更正后测试的
preg_repalce('#href="?http://([^/".]+)"?#i', 'href="http://$1.xxx.com"', $content);需要加一个正则分割符号,我以为你知道呢