You probably want a real parser.
That's really only necessary if the braces can be nested. If not, a regular expression can handle it, as for example in the above-posted solution.
In reply to Re: Parsing spaces and curly braces
by jonadab
in thread Parsing spaces and curly braces
by cochrasc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |