I am having a problem extracting a substring from a string using regex.
For example I have a string like follows
str = "result[cars][ford]"
Now I need a regex which can extract out cars and ford out of that string so that when
str.match({{regex}})[1]
would provide cars and
str.match({{regex}})[2]
would provide ford
Now i need that regex inside that curly braces.
Any link that helps to this question are most welcomed.