Regex Split bug in JScript?
I’ve been messing around with JavaScript quite a bit recently and I came across a ‘bug’ in the Microsoft implementation of the split() method.
Take the following example string (note the two tabs at the end):
var s = “Hello\tHow\tare\tyou\t\t”;
and then run the following to write it out to the screen:
document.writeln(s.split(”\t”));
Well that works as expected, and outputs [...]