$dsnStr='mysql://root:root@127.0.0.1:3306/test';
preg_match('/^(.?)://(.?): (.?)@(.?):([0-9]{1, 6})/(.*?)$/',trim($dsnStr),$matches);
I would like to ask why this cannot be matched. $natches is an empty array. How can I change it to match it?
滿天的星座2017-05-16 12:04:42
preg_match('/^(.*?):\/\/(.*?):(.*?)@(.*?):([0-9]{1,6})(.*?)$/',trim($dsnStr),$matches);