fork(1) download
  1. <?php
  2.  
  3. $re = "/('.)\\1*/";
  4. $str = "'a'a'a'a'b'c'c'a'a'd'e'e'e'e";
  5. preg_match_all($re, $str, $matches);
  6. print_r($matches[0]);
Success #stdin #stdout 0.02s 52480KB
stdin
Standard input is empty
stdout
Array
(
    [0] => 'a'a'a'a
    [1] => 'b
    [2] => 'c'c
    [3] => 'a'a
    [4] => 'd
    [5] => 'e'e'e'e
)