Right now the Regex Fast Filter is only matching every second item in the list, which is caused by setting the global flag for the regular expression, which is causing to search the next candidate by the lastIndex property. So if we have a match the first time, the lastIndex property is updated according to the last match and every subsequent usage of test resets it's index to 0, because there wasn't a match after the last known index.
Right now the Regex Fast Filter is only matching every second item in the list, which is caused by setting the global flag for the regular expression, which is causing to search the next candidate by the
lastIndex
property. So if we have a match the first time, thelastIndex
property is updated according to the last match and every subsequent usage oftest
resets it's index to 0, because there wasn't a match after the last known index.Example:
I'm going to push a Pull request, which fixes this issue by removing the global flag.