fork download
  1. <?php
  2.  
  3. $rulz="test closingdear [[12]]";
  4. preg_match_all("/\[\[(\d+)\]\]/", $rulz, $matches);
  5. var_dump($matches[1]);
  6. ?>
Success #stdin #stdout 0.02s 13112KB
stdin
Standard input is empty
stdout
array(1) {
  [0]=>
  string(2) "12"
}