I think your problem needs to be split into two parts. First, finding the letter(s). Second, finding the position.
$string = '0001564AC587B4965B5';
$positions = array();
// Find all letters
preg_match_all('/[a-z]/i', $string, $matches);
// Check if any letters found
if(isset($matches[0])) {
$offset = 0;
// Iterate through each letter and find corresponding position
foreach($matches[0] as $letter) {
$position = strpos($string, $letter, $offset);
if($position <> false) {
$positions[] = "{$letter}: {$position}";
$offset = $position + 1;
}
}
}
echo '<pre>'; print_r($positions); echo '</pre>'; die;