I have the following PHP string:
$str = "a b [[c], [d] then [e]] followed by [f] then [g]";
I'm trying to write 2 expressions in PHP; one to extract the [c], [d], [e] (including the square brackets) and a second regex to extract the [f] and [g] (including brackets).
Bonus points for anyone who can do it with whitespace added before or after a square bracket.
Does anyone have any ideas?
Thanks :)