Why the following pattern in IE and Firefox matches result different?
var str = 'a,b,c , d, e ,f';
var matches = str.split(/(\s+)?,(\s+)?/);
alert(matches);
IE:
a,b,c,d,e,f
firefox:
a,,,b,,,c, , ,d,, ,e, ,,f
how to match like IE result? please answer me :(
ie8 and firefox v3.6.8