[Webkit-unassigned] [Bug 26890] New: String#replace does not update global regexp lastIndex per ES3&5
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jul 1 10:54:19 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=26890
Summary: String#replace does not update global regexp lastIndex
per ES3&5
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Mac OS X 10.5
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: JavaScriptCore
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: john.david.dalton at gmail.com
According to spec String#replace should perform the following.
var s = '0x2x4x6x8';
var p = /x/g;
s.replace(p, function() { alert(p.lastIndex) });
// alert 2, then 4, then 6, then 8
alert(p.lastIndex); // alert 0
Opera currently does this correctly. There is a bug reported to Mozilla as
well.
https://bugzilla.mozilla.org/show_bug.cgi?id=501739
Discussion:
https://mail.mozilla.org/pipermail/es-discuss/2009-July/009628.html
https://mail.mozilla.org/pipermail/es-discuss/2009-July/009631.html
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list