Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.12.0
-
-
09e3e5438182de606ecbd8f352eddc482f78891f (qt/qtdeclarative/5.12.1)
Description
Given a simple js snippet like:
var prevString = " ok"; var r = /^(\s*)(([\)\]}]?\s*)*([\)\]]\s*))?;/.exec(prevString); if (r != null) { doSomeThing(); }
In old Qt versions pre 5.12, doSomeThing(); wasn't called, as the regex doesn't match (as there is no ';' in that prevString).
Now it matches.
Still, the complete "r[0].length" is 0, but e.g. r[1].length has the matched leading whitespaces.