次の文字列から、以下のような配列を構築する正規表現を考え出そうとしています
$str = 'Hello world [something here]{optional}{optional}{optional}{n possibilities of this}';
これまでのところ、/^(\*{0,3})(.+)\[(.*)\]((?:{[a-z ]+})?)$/
Array
(
[0] => Array
(
[0] => Hello world [something here]{optional}{optional}{optional}{n possibilities of this}
[1] =>
[2] => Hello world
[3] => something here
[4] => {optional}
[5] => {optional}
[6] => {optional}
[7] => ...
[8] => ...
[9] => {n of this}
)
)
これにはどのようなアプローチが良いでしょうか?ありがとう