I have the following regexp:
/(?:[\[\{]*)(?:([A-G\-][^A-G\]\}]*)+)(?:[\]\}]*)/
with the following expression:
{A''BsCb}
I expect 3 matched results
A''
Bs
Cb
but testing at https://regex101.com/ only gives me the last match Cb
, and tells me that a repeated capturing group will only capture the last iteration, put a capturing group around the repeated group.
I thought that was what I had done! I thought I'd understood the problem as described here http://www.regular-expressions.info/captureall.html Hence the brackets outside my + with the capturing group inside.
But either it's getting too late or I need someone who's head doesn't implode at the mention of regexp to show me where I've gone wrong.