日期:2014-05-17 浏览次数:20425 次
<?php $string = 'aaaa3aaa6aaaa2aaaaaa0aaaaaa2aaa1a'; $pattern=array('/(\d)/i'); $replace=array('[${1}]'); echo $string."<br/>"; echo preg_replace($pattern, $replace, $string); ?>