I am using GoLang
I want to extract and store contents between brackets which may contain nested brackets (Which we will want to ignore) and store whatever the content to the right of the last bracket is as a single match, regardless of how many lines, or how many quotes or different type of chars e.g.
[TSLA] [Model-ST[3000]123] "(Model:"3000"),
("Tesla":"CyberTruck"),
("Tesla":"Model(y)"),
("Tesla":"Battery-Day
I would like to get these when iterating
match1 = TSLA
match2 = Model-ST[3000]123
match3 = "(Model:"3000"),
("Tesla":"CyberTruck"),
("Tesla":"Model(y)"),
("Tesla":"Battery-Day
The Regex Pattern I currently have is
(\[(.*?)\])|"([^"]+".*|[(\+)])
This allows me to extract TSLA and Model-ST[3000 it does not ignore the nested bracket, and it also fails to extract the remaining content to the right of the last bracket as a whole