I stopped here
On Wed, Oct 16, 2013 at 5:54 AM, Benjamin (Inglor) Gruenbaum < [email protected]> wrote: > > ``` > myString.split(/ |-|\/|\+/g); // this is no fun to read > > myString.split(" ","-","/","+"); // this is easier > myString.split([" ","-","/","+"]); // this is also easier. > > ``` > easier for who ? All I was doing is being sure no double quoting was missing or not escaped correctly ... also you don't need the g flag and RegExp is much more powerful than multiple strings `myString.split(/before(and|or)?after/);` instead of 3 partially repeated nonsense ? My 2 cents
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

