You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my testing, '4'.match(/(?=(?:...)*$)/) returns [""] on Safari 7, and ["4", ""] on Safari 8, whereas Firefox, Opera, and Chrome return ['4'] for "4".split(/(?=(?:...)*$)/).
ljharb
changed the title
Inconsistent behaviour in String.prototype.split in iOs
Inconsistent behaviour in String#split in iOS/Safari
Feb 12, 2015
When I do the following:
"4".split(/(?=(?:...)*$)/)
all browsers returns ['4'] except for iOs and Safari on mac, which returns ['4', ''].
I do not know what is "correct" behaviour, but this is indeed an inconsistency between JS-engines.
The text was updated successfully, but these errors were encountered: