Bug of split() in IE?

var lines = “Hello\r\n\r\nJ2S\r\nWorld\r\n”.split (/\r\n|\r|\n/g);
alert (lines.length);

In both Mozilla/Firefox and Opera, it is 5. But in IE6, it is 3!

Is it bug of IE6? Does it exist in former IE or the future IE7?

This entry was posted in JavaScript. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>