日期:2014-05-17 浏览次数:20431 次
code name="hello1" version="2012"
code name="123" version="2012"
code name="代码" version="2012"
code name="20121226-001" version="2012"
code name="20121226-002" version="2012"
code name="20121226-003" version="2012"
$s=<<<HTML
codes name="name1"
code name="hello1" version="2012"
code name="123" version="2012"
code name="代码" version="2012"
HTML;
$i=0;
echo preg_replace('/"(.+)"(?=\s+version)/em','"\""."20121226-00".++$i."\""',$s);