fork download
  1. <?php
  2. $results = array();
  3. $string = 'asdfasdf {_LINK_2_} asdf {_LINK_1_}{_LINK_3_} asdf{_LINK_8_}';
  4. $exp = '/(?<={_LINK_)[0-9]+(?=_})/';
  5. $find = preg_match_all($exp, $string, $results);
  6. print_r($results);
  7. ?>
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
Array
(
    [0] => Array
        (
            [0] => 2
            [1] => 1
            [2] => 3
            [3] => 8
        )

)