I\'ve got the following source:
011011000010011011&
$test = '0110110000100110110110'; echo preg_replace ('~()([10]*)()~e', '"\\1" . str_repeat(" ", strlen ("\\2")) . "\\3"', $test);