<?php preg_match_all('~(?:[[{]*|(?!\A)\G)\K[A-G-][^A-G\]}]*~', "{A''BsCb}", $matches);print_r($matches);
Standard input is empty
Array ( [0] => Array ( [0] => A'' [1] => Bs [2] => Cb ) )
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!