I have been breaking my head on this for sometime now. In javascript I have a string expression where I need to remove the spaces between '[' and ']'.
For example the expression can be :-
"[first name] + [ last name ] + calculateAge()"
I want it to become :-
"[firstname] + [lastname] + calculateAge()"
I tried something from the following stackoverflow question for square brackets but didn't quite get there. How do I make the regex in that question, work for square brackets too?
Can anyone help?
Thanks, AJ