I was trying to use a regular expression to match the inner text between two characters, but I am getting the wrong text
I tried putting [A-z]* instead of .* for matching only the inner text and it worked. But I need to match non-letter characters too.
/\[?(,? ?\[(\[(.+)-(.+)\])\])\]?/g
This is my regular expression and i want to match the characters between the square brackets:
[[[hello-hello]],[[hi-hi]]]
The bold characters are the one matched.
I'd expect to match [[[hello-hello]],[[hi-hi]]] in match 1 and [[[hello-hello]],[[hi-hi]]] in match two.