Flagrant Badassery

A JavaScript and regular expression centric blog

RSS Feed for VBScriptVBScript

A JScript/VBScript Regex Lookahead Bug

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 […]

Read More