regex spliting doesn't work the same in all browsers, as is described by this article.
Internet Explorer excludes almost all empty values from the resulting
array (e.g., when two delimiters appear next to each other in the
data, or when a delimiter appears at the start or end of the data).
This doesn't make any sense to me, since IE does include empty values
when using a string as the delimiter.
Internet Explorer and Safari do
not splice the values of capturing parentheses into the returned array
(this functionality can be useful with simple parsers, etc.)
Firefox
does not splice undefined values into the returned array as the result
of non-participating capturing groups.
Internet Explorer, Firefox, and
Safari have various additional edge-case bugs where they do not follow
the split specification (which is actually quite complex).
(note : those behaviors changed somewhat in recent browsers, don't rely on these descriptions for implementing browser specific algorithms!)
The good news for you, if the order of delimiters is always the same : What probably really interests you, that is the content strings, will be here in all browsers. So you just have to test each string of the array to see if it's an empty string or a delimiter.
If your string always has the delimiters in the same order, you might want to strip them in all browsers by not capturing them :
var s = s.split(/To:|From:|Line:/);
If you need the delimiters because their order may change, then you'd better split on \b and check all strings.
console.log($(this).text());?"["Circular Quay ","Manly ","F1 Manly"]"