Index: sdk/lib/core/regexp.dart |
diff --git a/sdk/lib/core/regexp.dart b/sdk/lib/core/regexp.dart |
index c5b1b5b6106c1c857920ae85e681d62a36ef78d4..99f8befa6e63a7104eacffe3fd33b0544fd69276 100644 |
--- a/sdk/lib/core/regexp.dart |
+++ b/sdk/lib/core/regexp.dart |
@@ -10,7 +10,7 @@ |
* The following example finds all matches of a [RegExp] in a [String] |
* and iterates through the returned iterable of [Match] objects. |
* |
- * RegExp exp = new RegExp(r"(\w+)"); |
+ * RegExp exp = const RegExp(r"(\w+)"); |
* String str = "Parse my string"; |
* Iterable<Match> matches = exp.allMatches(str); |
* for (Match m in matches) { |
@@ -84,7 +84,7 @@ abstract class Match { |
* The following example finds all matches of a regular expression in |
* a string. |
* |
- * RegExp exp = new RegExp(r"(\w+)"); |
+ * RegExp exp = const RegExp(r"(\w+)"); |
* String str = "Parse my string"; |
* Iterable<Match> matches = exp.allMatches(str); |
*/ |
@@ -93,8 +93,8 @@ interface RegExp extends Pattern default JSSyntaxRegExp { |
* Constructs a regular expression. The default implementation of a |
* [RegExp] sets [multiLine] and [ignoreCase] to false. |
*/ |
- RegExp(String pattern, {bool multiLine: false, |
- bool ignoreCase: false}); |
+ const RegExp(String pattern, {bool multiLine: false, |
+ bool ignoreCase: false}); |
/** |
* Searches for the first match of the regular expression |