Probably dead simple for someone out there, but I want to build a regex that will search across this string:
foo[0][2]
and return
foo
0
2
in the array of matches
So far I have come up with is
\([a-z]*)(\[(\d)\])/g
which only gives back
0: "foo[0]"
1: "foo"
2: "[0]"
3: "0"
It's not repeating onto the next literal array in my string, so not hitting the [2] part.
I'm no regex ninja, and would appreciate some assistance with arriving at the correct expression I need.
Thanks