All pastes #478693 Raw Edit

Someone

public php v1 · immutable
·published 2007-05-09 10:03 UTC
rendered paste body
$in='foo {L[register]} foo {L[bar]} foo {L[blah]} foo';preg_match_all('#\{(L\[([^\]]+)\])\}#', $in, $out);var_dump($out);// outputarray(3) {  [0]=>  array(3) {    [0]=>    string(13) "{L[register]}"    [1]=>    string(8) "{L[bar]}"    [2]=>    string(9) "{L[blah]}"  }  [1]=>  array(3) {    [0]=>    string(11) "L[register]"    [1]=>    string(6) "L[bar]"    [2]=>    string(7) "L[blah]"  }  [2]=>  array(3) {    [0]=>    string(8) "register"    [1]=>    string(3) "bar"    [2]=>    string(4) "blah"  }}