for a string like "{foo}{bar}"
is there an easy
str = "{foo}{bar}"
first, second = str:gmatch(...)...
should give first="foo"
and second="bar"
The problem is that foo
itself can have some more parentheses, eg:
str = "{foo {baz}{bar}"
so that first = "foo {baz"
The
bar
part has only alphanumerical characters, no parentheses