i've tried a litte bit.
My findings can be broken down into the following:
It's true JS can is not able to understand (?i) it can only be used globally. Therefore:
console.log(/(?i:[A-Z]{3})/.test("abcdefghijkl"));
// should return an error
// or false if (?i) is ignored
console.log(/(?i:[A-Z]{4})/.test("abcdefghijkl")); // same here
If {x}
is between 0 and 3 it returns true
otherwise it returns false
this is true for firefox nightly, firefox, brave, opera, chrome and edge.
The reason why I believe this is a bug:
After using safari it throws an error
Invalid regular expression: unrecognized character after (?
Therefore I believe you are right this is a bug in chromium and firefox.
I hope this helps and if anything is unclear or incorrect please let me know! :)