fork(1) download
  1. <?php
  2. $string = 'ABCDE1234ABCD1234ABCDEF1234';
  3. $regex = '~\D+\d{4}~';
  4. preg_match_all($regex, $string, $matches);
  5. print_r($matches);
  6. ?>
Success #stdin #stdout 0.01s 52488KB
stdin
Standard input is empty
stdout
Array
(
    [0] => Array
        (
            [0] => ABCDE1234
            [1] => ABCD1234
            [2] => ABCDEF1234
        )

)