« Bugzilla Issues Index
#2618 — 21.2.5.7 RegExp.prototype.replace: non-global replace does not work
- bug_id:
2618
- creation_ts:
2014-04-10 05:54:00 -0700
- short_desc:
21.2.5.7 RegExp.prototype.replace: non-global replace does not work
- delta_ts:
2014-04-29 22:12:13 -0700
- product:
Draft for 6th Edition
- component:
technical issue
- version:
Rev 23: April 5, 2014 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
FIXED
- priority:
Normal
- bug_severity:
normal
- everconfirmed:
true
- reporter:
André Bargull
- assigned_to:
Allen Wirfs-Brock
- commentid:
7645
- comment_count:
0
- who:
André Bargull
- bug_when:
2014-04-10 05:54:04 -0700
21.2.5.7 RegExp.prototype.replace ( string, replaceValue ).
Add a new step 16.d.xvii:
> If global is false, then let done be true.
Test case:
---
"abab".replace(/ab/, "c")
---
Expected: Returns "cab"
Actual: In step 16.d.xv, the substring starting from nextSrcPosition=2 to position=0 will be retrieved, which is invalid because nextSrcPosition > position.
- commentid:
7724
- comment_count:
1
- who:
Allen Wirfs-Brock
- bug_when:
2014-04-14 12:57:02 -0700
fixed in rev24 editor's draft
- commentid:
8000
- comment_count:
2
- who:
Allen Wirfs-Brock
- bug_when:
2014-04-29 22:12:13 -0700
fixed in rev24