又有个简单正则写不出了,请大家帮忙 preg_match("/.*com\/(.+?shtml)/i",$filename,$m_other_link); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <?php$filename = "D:/htdocs/com/a/2006-11/29/15-37-54-399-3117.shtml";preg_match("|com/(.*?)|iU", $filename, $m_other_link);print_r($m_other_link);?> output:Array( [0] => com/a/2006-11/29/15-37-54-399-3117.shtml [1] => a/2006-11/29/15-37-54-399-3117.shtml) 还有谢谢iasky(C#_ASP_PHP),呵呵 请问可不可以这样传值? php 读取mysql是乱码 PHPExcel导出出错 问个问题.. 虚拟主机怎么设置ReWrite规则? 真正高手的问题-mime邮件编码 php安装问题急需解决,在线等! 请问如何用PHP实现修改IE的主页? 做课程设计,急用!!!急用!!!急用!!!急用!!! 用php如何判断insert失败?update失败?(sybase) file_get_contents函数跟哪些设置有关? 使用过appserv-win32-2.5.7的php高手们进来我有个问题
$filename = "D:/htdocs/com/a/2006-11/29/15-37-54-399-3117.shtml";
preg_match("|com/(.*?)|iU", $filename, $m_other_link);
print_r($m_other_link);
?> output:
Array
(
[0] => com/a/2006-11/29/15-37-54-399-3117.shtml
[1] => a/2006-11/29/15-37-54-399-3117.shtml
)