关于正则,求高手帮助如例:http://bbs.csdn.net/topics/new?forum_id=PHPhttp://www.bdyy.cc/detail/?20236.htmlhttp://www.qq.com/html/?20236.html?id=88888preg_match('/(http:\/\/)(.*)(\/)/',$rrr,$matches);如何分别正则出:bbs.csdn.netwww.bdyy.ccwww.qq.com 分享到: ------解决方案--------------------$s=<<http://bbs.csdn.net/topics/new?forum_id=PHPhttp://www.bdyy.cc/detail/?20236.htmlhttp://www.qq.com/html/?20236.html?id=88888txt;preg_match_all('/http:\/\/([^\/]+)\//s',$s,$matches);print_r($matches[1]);登录后复制Array( [0] => bbs.csdn.net [1] => www.bdyy.cc [2] => www.qq.com)------解决方案-------------------- preg_match('/http:\/\/([^\/]*)/i',$rrr,$matches);