<?php $re = "/('.)\\1*/"; $str = "'a'a'a'a'b'c'c'a'a'd'e'e'e'e"; preg_match_all($re, $str, $matches);print_r($matches[0]);
Standard input is empty
Array ( [0] => 'a'a'a'a [1] => 'b [2] => 'c'c [3] => 'a'a [4] => 'd [5] => 'e'e'e'e )
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!