Subj : string.split(); To : Digital Man From : MCMLXXIX Date : Thu Sep 30 2010 11:53 am Re: string.split(); By: Digital Man to MCMLXXIX on Tue Sep 28 2010 15:16:24 > > I've been working on something that splits a string at certain match > > points, and noticed that it crashes JSEXEC in windows, but not in linux.. > > > > try this: > > > > "this is a test".split(/(is|a|test)/ig); > > It is interesting that it's crashing. Did you confirm that you're testing wi > the same version of SpiderMonkey (jslib) on Windows and Linux? When I get a > chance, I'll see if I can pass on a trace to the SpiderMonkey guys. They may > have already fixed this one. > > Anyway, String.split() doesn't take a regexp as an argument, so what you're > trying to do won't work anyway. See > https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String > details. > interestingly enough, using a regexp gives you a slightly different result: "0123456789".split("2"); // 01,3456789 "0123456789".split(/2/); // 01,2,3456789 --- þ Synchronet þ The BRoKEN BuBBLE (MDJ.ATH.CX) .