I recently discovered a bug in V8 where lone surrogates separated by a backreference (capturing undefined, because it hasn't captured anything yet) incorrectly match a combined surrogate pair (new RegExp('(\ud801\\1\udc0f)','u')).exec('\ud801\udc0f')).
Investigating a little more showed that other engines also have bugs w.r.t lone surrogate pairs, which makes me think that an added Note to the spec might be appropriate.
I recently discovered a bug in V8 where lone surrogates separated by a backreference (capturing undefined, because it hasn't captured anything yet) incorrectly match a combined surrogate pair (
new RegExp('(\ud801\\1\udc0f)','u')).exec('\ud801\udc0f')
). Investigating a little more showed that other engines also have bugs w.r.t lone surrogate pairs, which makes me think that an added Note to the spec might be appropriate.Some interesting tests:
And the output of Chakrja, JSC and V8:
V8 Bug: https://crbug.com/v8/13410