I have a string as shown below and i am trying to separate each part (,) into an array.
let stringArr = remainderString.componentsSeparatedByString(",")
0lY6P5Ur90TAQnnnI6wtnb,#29,Projekt-FZK-Haus,Projekt FZK-House create by KHH Forschuungszentrum Karlsruhe,$,$,$,(#67,#229,#275),#42
Results
["0lY6P5Ur90TAQnnnI6wtnb", "#29", "Projekt-FZK-Haus", "Projekt FZK-House create by KHH Forschuungszentrum Karlsruhe", "$", "$", "$", "(#67", "#229", "#275)", "#42"]
If you notice, the part (#67,#229,#275) were separated into "(#67", "#229", "#275)"
I want to insert those values inside the (braces) into an another array. So my question is, how can I locate the opening ( and then the closing ) ?
let regex = "\\([^()]*\\)|[^,]+"regex to match the substrings separately.