fork(1) download
  1. <?php
  2.  
  3. $re = "/(?=(1....1))/";
  4. $str = "001110000100001100001";
  5. preg_match_all($re, $str, $matches);
  6. print_r($matches[1]);
Success #stdin #stdout 0.02s 52432KB
stdin
Standard input is empty
stdout
Array
(
    [0] => 100001
    [1] => 100001
    [2] => 100001
)