119
rated 0 times
[
124]
[
5]
/ answers: 1 / hits: 23176
/ 12 Years ago, wed, march 28, 2012, 12:00:00
I have the string SUM([A2:A10],[B2:B10],[C2:C10],[D2:D10])
and I need to get the elements [A2:A10],[B2:B10],[C2:C10],[D2:D10]
in an array, so I used match()
in js. The code snippet is
var formula = SUM([A2:A10],[B2:B10],[C2:C10],[D2:D10]);
var reg = /[(a-zA-Z0-9)+]/;
matches = formula.match(reg);
But I am not getting the match. I hope the regular expression is wrong. I am very poor in building regular expression. What will be the correct regular expression?
More From » regex