fork download
  1. <?php
  2.  
  3. $re = '/\s*#[^:]+:\s*/';
  4. $str = '#Jhon: Manager #Mac: Project Manager #Az: Owner';
  5. $res = preg_split($re, $str, -1, PREG_SPLIT_NO_EMPTY);
  6. print_r($res);
Success #stdin #stdout 0.01s 82944KB
stdin
Standard input is empty
stdout
Array
(
    [0] => Manager
    [1] => Project Manager
    [2] => Owner
)