split function in java script
-
i want to split date with separators with ' ' or '/' or '-'. i am trying to split the string with all this separators like var temp1 = new Array(); temp1 = datevalue1.split('/','-',' '); but it will not split datevalue1 string with all this separtors. but if i give only one paramert in split() function then it will work. so please provide some guidance that is it possible to split string with multiple parameters?
-
i want to split date with separators with ' ' or '/' or '-'. i am trying to split the string with all this separators like var temp1 = new Array(); temp1 = datevalue1.split('/','-',' '); but it will not split datevalue1 string with all this separtors. but if i give only one paramert in split() function then it will work. so please provide some guidance that is it possible to split string with multiple parameters?
deepalititi wrote:
temp1 = datevalue1.split('/','-',' ');
split method has only one parameter as input. So you can't pass more than one parameters to the split method. All you have to do is to do the split one by one. :cool:
Regards, Venkatesh Mookkan. Software Engineer, India My: Website | Yahoo Group | Blog Spot
-
deepalititi wrote:
temp1 = datevalue1.split('/','-',' ');
split method has only one parameter as input. So you can't pass more than one parameters to the split method. All you have to do is to do the split one by one. :cool:
Regards, Venkatesh Mookkan. Software Engineer, India My: Website | Yahoo Group | Blog Spot
thank you for your guidance:)