Answer the question
In order to leave comments, you need to log in
Convert from javascript to VBA?
var str="{Volkswagen 2008-2017, Skoda 2008-2017, Seat 2008-2017}";
var exec=/{\w+ (\d{4}-\d{4}), \w+ (\d{4}-\d{4})/.exec(str);
var ear1=exec[1].split('-');
var ear2=exec[2].split('-');
function methodName(a){
a[0]=Number(a[0]);
a[1]=Number(a[1]);
var arr=[];
for(var i=a[0];i<a[1];i++)
arr.push(i);
return arr;
}
ear1=methodName(ear1);
ear2=methodName(ear2);
ear1='{'+ear1.join(' год, ')+' год}';
ear2='{'+ear2.join(' год, ')+' год}';
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question