Run »
'countLetters', '/[0-9]+/' => 'countDigits' ]; $result = preg_replace_callback_array($patterns, $input); echo $result; ?>
365[3digit] days[4[1digit]letter]