fork(1) download
  1. str = "{foo {baz}{bar}"
  2. first, second = str:match('{([^}]*)}%s*{([^}]*)}')
  3. print (first, "---", second)
Success #stdin #stdout 0s 14112KB
stdin
Standard input is empty
stdout
foo {baz	---	bar