I have written this really simple regular expression which checks if the whole string represents one or more hexadecimal numbers (optionally starting with "0x", separated by comma, minus sign or a whitespace character):
/^((0x)?[0-9A-F]+[,\-\s]*)+$/i
To me, this regex is very straightforward, but this simple test crashs Firefox and Edge at all, Chrome takes 100% CPU usage for about 15 seconds and then returns the expected result "false":
/^((0x)?[0-9A-F]+[,\-\s]*)+$/i.test("012345678901234567890123456789_0");
Has anyone an idea what's wrong here?