I am receiving an unexpected qualifier error in IE 11 using the following expression which is coming from the RegExp constructor polyfill.
const pathRegex = /^(?<schema>[-a-z]+)\.(?<table>[-a-z]+)\.(?<fieldPath>[a-zA-Z_[\].0-9]+)$/;
const regex = RegExp(`^${pathRegex.source.substring(1,pathRegex.source.length - 1)}#(?<bindingNumber>[0-9]+)$`);
I wanted to use pathRegex by itself but the normal regex variable is suppose to be made up of the pathRegex variable. Right now I can work around this by copying it over, but I would prefer to use the variable to construct the whole regex.
I am using core-js@3 and [email protected]
I must say the usage flag recently introduced is making my job of maintaining IE 11 compatibility a lot easier!
@zloirock I would like to contribute , can you tell me what needs to be done?
@AlokTakshak you could find some basic info here. As an example, you could take a look at Number constructor wrapper for handling modern number literals.
If you have any more detailed questions - just ask me.
RegExp constructor should parse patterns with NCG syntax and return a regex created from pattern allowed in the old version of the language with internal metadata about NCG. RegExp.prototype.exec should be patched for creating groups property with the required result.
Seems something like here https://github.com/commenthol/named-regexp-groups, but in the main class.
babel transform output and the helperRegExp.prototype.exec, but also in some other methods, for example, on RegExp.prototype[@@replace], but I don't think that on match since String methods related RegExp should call related RegExp methods and they should call RegExp.prototype.exec under the hood. See the spec.