- preg_replace_callback: documentation ( source)
- strtolower: documentation ( source)
<?php
$test = 'A0000001002034';
$n = strlen($test);
$incr = preg_replace_callback(
'|(\d{1,2})/(\d{1,2})/(\d{4})|',
function ($matches) {
//return str_pad($matches[0] + 1, $n, 0, STR_PAD_LEFT);
return strtolower($matches[0] + 1);
},
$test
);
echo $incr."\r\n";