标题: 正则求教
时间: 2020-11-20发布,2020-11-20修改
$url = 'http://12eee.com/notify/xxxx/ingg';
dump($url);
preg_match('/https?:\/\/(.*?)\/(.*?)/', $url, $ret);
dump($ret);
这样打印出来的结果为什么为空呢
string(33) "http://12eee.com/notify/xxxx/ingg"
array(3) {
[0] => string(17) "http://12eee.com/"
[1] => string(9) "12eee.com"
[2] => string(0) ""
}
为什么会触发不匹配,有些情况下又会匹配
『回复列表(1|隐藏机器人聊天)』