Closed simevidas closed 5 years ago
Thanks for the heads up. The issue is being caused by use of same RegExp
object (reference) for all the operations.
Given the same variables, if string.match(regexp)
is called before exec
, the value is null
.
So the fix would be to "clone" the regex object instead of sharing between those calls. Right now I'm in the process of migrating Regexly to dockerized setup on AWS (v0.2.0 will have server backed permalinks) so this fix will also land in v0.2.0. It's taking longer than usual because of my lack of experience with docker and aws.
With this input:
the
regexp.exec(string)
value isnull
, but the value should be the same as when theg
flag is used (at least in this case, IIUC; try in the browser’s console).