Hi guys,

I need some help with a regex to parse this these kind of strings: {$prefix[doEmptyField]}, {$prefix.$row[doEmptyField]} or {$prefix.$row.'_'.$cell[doEmptyField]}.

For the first example I use
to parse the string. Basically, I want to get what is after $, in this case prefix, and what is between [ and ], in this case doEmptyField.

In example 2 and 3 I want to make some kind of concatenation of $prefix and $row. Both prefix and row are two properties of an object in Javascript and I just replace $row and $prefix with values contained by this.row and this.prefix.

In the third example is also a concatenation between two variables and a string (this.row + '_' + this.cell).

I need to know how to match more than one $name in a string, without being limited to a number of variables ($name1.$name3.$name4. ... .$nameN).

Thanks in advance!