Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Issue 8907042: Support replaceAll for regexps. (Closed)

Created:
9 years ago by nweiz
Modified:
9 years ago
Reviewers:
Jennifer Messerly
CC:
reviews_dartlang.org, mattsh
Visibility:
Public.

Description

Support replaceAll for regexps. TBR Committed: https://code.google.com/p/dart/source/detail?r=2441

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -21 lines) Patch
M frog/lib/corelib_impl.dart View 2 chunks +14 lines, -7 lines 2 comments Download
M frog/lib/string_implementation.dart View 1 chunk +19 lines, -8 lines 1 comment Download
M frog/minfrog View 1 chunk +18 lines, -6 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
nweiz
9 years ago (2011-12-14 20:02:04 UTC) #1
Jennifer Messerly
lgtm http://codereview.chromium.org/8907042/diff/1/frog/lib/corelib_impl.dart File frog/lib/corelib_impl.dart (right): http://codereview.chromium.org/8907042/diff/1/frog/lib/corelib_impl.dart#newcode289 frog/lib/corelib_impl.dart:289: * Note that the returned RegExp disobeys the ...
9 years ago (2011-12-14 20:36:56 UTC) #2
nweiz
9 years ago (2011-12-14 21:39:21 UTC) #3
http://codereview.chromium.org/8907042/diff/1/frog/lib/corelib_impl.dart
File frog/lib/corelib_impl.dart (right):

http://codereview.chromium.org/8907042/diff/1/frog/lib/corelib_impl.dart#newc...
frog/lib/corelib_impl.dart:289: * Note that the returned RegExp disobeys the
normal API in that it maintains
On 2011/12/14 20:36:56, John Messerly wrote:
> nice refactoring :)
> 
> out of curiosity--what does it mean that the returned RegExp disobeys the
normal
> api? Is it a bug we should fix, or an implementation note?

It's an implementation note. When a JS regexp has the "g" flag set and it's run
against the same string multiple times, it searches further into the string each
time. This is intended, and it's how we implement AllMatchesIterator.

Powered by Google App Engine
This is Rietveld 408576698