Enable literal syntax for RegExp objects just like List and Map #10519
Labels
area-language
Dart language related items (some items might be better tracked at github.com/dart-lang/language).
closed-duplicate
Closed in favor of an existing report
type-enhancement
A request for a change that isn't a bug
This issue was originally filed by azn...@gmail.com
In Javascript, just like [] and {} do for arrays and objects, Dart features LIst and Map shorthand create syntax.
But for some reason, for Regular Expression objects, this syntax (in Javascript, Perl, Ruby - use of the '//' delimiters) is not enabled.
So instead of:
new RegExp(r'^(_+)(._)$')
would like to write;
/^(_+)(._)$/
The text was updated successfully, but these errors were encountered: