I'm not expert in Regex and I want just do this thing. Create this array :
["[1+5]", "1+5", "[2*[1+1]+5]", "2*[1+1]+5", "[1+1]", "1+1"]
from this string :
"blalbla[1+5] blabla [2*[1+1]+5] blalbla"
I have tested a lot of methods, I have a headache... Here the link to test what I have did: https://jsfiddle.net/a47e60pd/1/
Thanks a lot :)
XRegExp.matchRecursive.1+1with2?