function preMatch($i,$str){
preg_match_all('/([^;]{1,};){2}/',$args,$matches);
if(!empty($matches[0])){
$str="";
foreach($matches[0] as $substr)
{
$str.=$substr;
}
$len=strlen($str);
$subStr= substr($args,$len);
if(isset($subStr))
array_push ($matches[0], $subStr);
print_r($matches[0]);exit;
}
else
print_r ($args);
}
转载于:https://www.cnblogs.com/lsl8966/archive/2013/01/08/2851070.html