You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
402 B
12 lines
402 B
'use strict';
|
|
var fails = require('../internals/fails');
|
|
var global = require('../internals/global');
|
|
|
|
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
|
var $RegExp = global.RegExp;
|
|
|
|
module.exports = fails(function () {
|
|
var re = $RegExp('(?<a>b)', 'g');
|
|
return re.exec('b').groups.a !== 'b' ||
|
|
'b'.replace(re, '$<a>c') !== 'bc';
|
|
});
|
|
|