I have the following regexp:
/(?:[\\[\\{]*)(?:([A-G\\-][^A-G\\]\\}]*)+)(?:[\\]\\}]*)/
with the following expression:
{A\'\'
You already figured it out. Regarding to @sln's comment, there is no way to gather each singular match in one or different capturing groups while repeating a group in PCRE which is PHP's regex flavor. In this case only the last match is captured.
However if asserting that braces should be there at the start and end of string is not important and you only need those values there is less work to do:
$array = array_filter(preg_split("~(?=[A-G])~", trim("{A''BsCb}", '[{}]')));
Regex:
(?=[A-G]) # Positive lookahead to find next character be one from character class
This regex will match all similar positions to output correct data on split:
array(3) {
[1]=>
string(3) "A''"
[2]=>
string(2) "Bs"
[3]=>
string(2) "Cb"
}
Live demo