I have the following string: pass[1][2011-08-21][total_passes]
pass[1][2011-08-21][total_passes]
How would I extract the items between the square brackets into an array? I tried
add the global flag to your regex , and iterate the array returned .
match(/\[(.*?)\]/g)