日期:2014-05-16 浏览次数:20515 次
$arr = array('100-10', '-50','200-20', '300-30', '-30'); $b = array(); foreach ($arr as $value) { if(preg_match("/[\d-]+/", $value,$match)){ array_push($b, $match); } } var_dump($b);