I am having trouble extracting some patterns from a string using PHP. Here is the example string:
"New [[supplier]] price request for [[legal-entity]]"
What I need to do is extract all the "merge tags" (in brackets), from that string and output in an array. The array I need is:
array(
0 => "[[supplier]]',
1 => "[[legal-entity]]"
);
preg_match_all(). Search SO for previous answers too - this is definitely a question that I've seen before