bug in Safari javascript RegExp?

This code splits the string into 2 pieces in Firefox and IE,
but just 1 piece in Safari. It seems like a bug in RegExp.
The "i" flag is supposed to mean the expression is
case-insensitive.

var r = new RegExp("x", "i");
var s = "helloXbye";
var parts = s.split(r);
alert("split into " + parts.length + " parts");


Windoze Windows XP

Posted on Dec 16, 2005 7:10 AM

Reply
4 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

bug in Safari javascript RegExp?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.