[Webkit-unassigned] [Bug 45959] String.prototype.replace passes undefined rather than empty string for groups that don't match

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 20 22:40:34 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=45959





--- Comment #7 from Mike Kamermans <pomax at nihongoresources.com>  2010-09-20 22:40:34 PST ---
It would probably be better to consult with the ECMA mailing list on this, rather than relying on how exec() behaves to determine how replace() should resolve. According to Eich the captures should be empty strings once the pattern matching is done, with the only way to get an undefined capture is during back-reference in the regexp itself. It is entirely possible that the IE9 team implemented replace() incorrectly as well, and they have something to fix, too. They did write a new JS engine pretty much from scratch.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list