• string.split();

    From MCMLXXIX@VERT/MDJ to Digital Man on Mon Sep 27 12:21:45 2010
    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);ããã---ã þ Synchronet þ The BRoKEN BuBBLE (MDJ.ATH.CX)ã
  • From Digital Man@VERT to MCMLXXIX on Tue Sep 28 15:16:24 2010
    Re: string.split();ã By: MCMLXXIX to Digital Man on Mon Sep 27 2010 12:21 pmãã > 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 withã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 forãdetails.ãã digital manããSnapple "Real Fact" #184:ãThe most used letters in the English language are E, T, A, O, I and N.ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From MCMLXXIX@VERT/MDJ to Digital Man on Thu Sep 30 11:42:35 2010
    Re: string.split();ã By: Digital Man to MCMLXXIX on Tue Sep 28 2010 15:16:24ãã > Re: string.split();ã > By: MCMLXXIX to Digital Man on Mon Sep 27 2010 12:21 pmã > ã > > 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.ã > ããit does take a regexp as an argument, and the above statement works fine inãlinux, I can only assume it is the same version of spidermonkey, as they areãboth running the same dev build of synchronet. same everything.ããthe "g" wasnt necessary in that above example, I realize, but it does actuallyãwork... result: th,is, ,is, ,a, ,test,ãã---ã þ Synchronet þ The BRoKEN BuBBLE (MDJ.ATH.CX)ã
  • From MCMLXXIX@VERT/MDJ to Digital Man on Thu Sep 30 11:53:48 2010
    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)ã
  • From MCMLXXIX@VERT/MDJ to Digital Man on Thu Sep 30 11:57:04 2010
    Re: string.split();ã By: MCMLXXIX to Digital Man on Thu Sep 30 2010 11:53:48ãã > 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 linuã > > >ã > > > 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ã > > the same version of SpiderMonkey (jslib) on Windows and Linux? When I getã > > chance, I'll see if I can pass on a trace to the SpiderMonkey guys. They ã > > have already fixed this one.ã > >ã > > Anyway, String.split() doesn't take a regexp as an argument, so what you'ã > > trying to do won't work anyway. Seeã > > https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Striã > > details.ã > >ã > ã > interestingly enough, using a regexp gives you a slightly different result:ã > "0123456789".split("2"); // 01,3456789ã > "0123456789".split(/2/); // 01,2,3456789ã > ããactually, I have to amend that last example... ã"0123456789".split(/2/); // 01,3456789ã"0123456789".split(/(2)/); //01,2,3456789ãã---ã þ Synchronet þ The BRoKEN BuBBLE (MDJ.ATH.CX)ã
  • From Digital Man@VERT to MCMLXXIX on Thu Sep 30 16:46:02 2010
    Re: string.split();ã By: MCMLXXIX to Digital Man on Thu Sep 30 2010 11:42 amãã > Re: string.split();ã > By: Digital Man to MCMLXXIX on Tue Sep 28 2010 15:16:24ã >ã > > Re: string.split();ã > > By: MCMLXXIX to Digital Man on Mon Sep 27 2010 12:21 pmã > >ã > > > 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/Striã > > details.ã > >ã >ã > it does take a regexp as an argument, and the above statement works fine inã > linux, I can only assume it is the same version of spidermonkey, as theyã > are both running the same dev build of synchronet. same everything.ããI see that now. Weird.ãã digital manããSnapple "Real Fact" #122:ãA duck can’t walk without bobbing it’s head. ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã