fork(1) download
  1. <?php
  2.  
  3. $str = 'a-1 90 b55 0 -4 4 c9';
  4. $array = preg_split('#(?<=[abc])#',$str, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
  5. print_r($array);
Success #stdin #stdout 0.03s 24176KB
stdin
Standard input is empty
stdout
Array
(
    [0] => a
    [1] => -1 90 b
    [2] => 55 0 -4 4 c
    [3] => 9
)