Home >Backend Development >PHP Tutorial > php简单正则有关问题
php简单正则问题
<br /> <?php<br /> $timestamp = '2012年02月03 15:06:46';<br /> preg_match_all("/(.*?)年(.*?)/is", $timestamp, $rarr, PREG_SET_ORDER);<br /> print_r($rarr);<br /> <br /> preg_match_all("/(.*?)年(.*?)月(.*?) (.*?):(.*?):(.*?)/is", $timestamp, $rarr, PREG_SET_ORDER);<br /> print_r($rarr);<br /> ?><br />