Cases not specified by the OP behave as follows:
"xxx{yyy zzz}" is split into "xxx{yyy" and "zzz}".
"{xxx yyy}zzz" is split into "{xxx yyy}" and "zzz".
@matches = /({[^}]+}|[^{\s]+)/g; might work better:
"xxx{yyy zzz}" is split into "xxx" and "{yyy zzz}".
"{xxx yyy}zzz" is split into "{xxx yyy}" and "zzz".
In reply to Re^2: Parsing spaces and curly braces
by ikegami
in thread Parsing spaces and curly braces
by cochrasc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |