A JScript/VBScript Regex Lookahead Bug
Monday, March 24th, 2008 • Related • Filed Under
Here's one of the oddest and most significant regex bugs in Internet Explorer. It can appear when using optional elision within lookahead (e.g., via ?, *, {0,n}, or (.|), but not +, interval quantifiers starting from one or higher, or alternation without a zero-length option). An example in JavaScript:
/(?=a?b)ab/.test("ab");
// Should return true, but IE 5.5 [...]
