I think one way in this case is to just input the entire thing as a single string and parse the string yourself. Probably not too bad because you can just split it into chunks by commas, discard the brackets, trim whitespace, and then parse to integer. Some regex wiz can probably do it in 2-3 lines of code.