Function to parse a delimited string and return a table