I would like to make an array containing strings in this format:
[Texto com acento espaço e números 99]
Example, if I have this string:
var texto = "Eu quero comprar [qtdOvos] e [qtdFrutas] somando o total de [totalCompras]";
I need to mount the following array:
var arrayStrings = ["[qtdOvos]", "[qtdFrutas]", "[totalCompras]";
Is there any way to do this through regular expression?