Index: runtime/lib/regexp_patch.dart |
diff --git a/runtime/lib/regexp_patch.dart b/runtime/lib/regexp_patch.dart |
index a9ccd55527ec503550ee2969c974b6a4d04c68fc..0c9320452470020883d21daa3fb73dcd1c878300 100644 |
--- a/runtime/lib/regexp_patch.dart |
+++ b/runtime/lib/regexp_patch.dart |
@@ -160,11 +160,8 @@ class _RegExp implements RegExp { |
if (start < 0 || start > string.length) { |
throw new RangeError.range(start, 0, string.length); |
} |
- // Inefficient check that searches for a later match too. |
- // Change this when possible. |
- List<int> list = _ExecuteMatch(string, start); |
+ List<int> list = _ExecuteMatchSticky(string, start); |
if (list == null) return null; |
- if (list[0] != start) return null; |
return new _RegExpMatch(this, string, list); |
} |
@@ -238,6 +235,9 @@ class _RegExp implements RegExp { |
List _ExecuteMatch(String str, int start_index) |
native "RegExp_ExecuteMatch"; |
+ |
+ List _ExecuteMatchSticky(String str, int start_index) |
+ native "RegExp_ExecuteMatchSticky"; |
} |
class _AllMatchesIterable extends IterableBase<Match> { |