1 2 3 4 5 6 7 8
var repeated = "A".repeat(65536); var src = "^(?:" + repeated + ")\$"; for (var i = 0; i < 100; i++) { try { RegExp(src).test(); } catch {} }