When the `runtime` flag is on (by default), this plugin adds a new helper which wraps the native `RegExp` class to provide groups support. People nees to use a polyfill (I implemented it in core-js) for browsers that don't support ES6 regexps.
5 lines
155 B
JavaScript
5 lines
155 B
JavaScript
var re = /no-groups-\(?<looks-like-a-group>looks\)/;
|
|
var result = re.exec("no-groups-(<looks-like-a-group>looks)")
|
|
|
|
expect(result.groups).toBeUndefined();
|