21,886
社区成员
发帖
与我相关
我的任务
分享
<?php
$subject = <<<H
A123bcd456;
NAE67-abc321;
NIA101ert65se;
H;
preg_match_all('/^([a-zA-Z]+)(\d+)(?=[a-zA-Z-])/ims', $subject, $matches);
for($i = 0; $i < count($matches[0]); $i++){
$output .= $matches[1][$i].",".$matches[2][$i].";";
}
echo $output;
?>