I have a long string containing attributes, in order to parse this I am attempting to extract the 'lists' from the string, I'm having some trouble particularly when dealing with multi-dimensional lists.
An Example String:
'a="foo",c=[d="test",f="bar",g=[h="some",i="text"],j="over"],k="here",i=[j="baz"]'
I would like to extract
c=[d="test",f="bar",g=[h="some",i="text"],j="over"]
and
i=[j="baz"]
from this string.
Is this possible using regex?
I've tried numerous different regex, this is my most recent one:
([^\W0-9]\w*=\[.*\])