I have an expression which I need to split and store in an array:
aaa=\"bbb{ccc}ffffd\" { aa=\"bb,cc\" { a=\"b\", c=\"d\" } }, aaa=\"bbb{}\" { aa=\"b}b\" }, aa
A split solution seems simplest. Split on a lookahead of your main variable aaa, with word boundary around. Strip trailing whitespace and comma with an optional character group.
$string = 'aaa="bbb{ccc}ffffd" { aa="bb,cc" { a="b", c="d" } }, aaa="bbb{}" { aa="b}b" }, aaa="bbb,ccc"';
my @array = split /[,\s]*(?=\baaa\b)/, $string;