in reply to spliting a string based on multiple delimiters and printing required o/p.
What have you tried and how did it fail for you?
For example, you could split on {, } and whitespace, and discard all empty elements.