Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.0
-
None
-
-
649ee12aba2ee92781f0ab888d21a1bdb440b7da (qt/qtbase/5.12)
Description
Wildcard matching does not work as expected
*.p -> [^/]*\.p should be: [^/]*\.p$
https://regex101.com/r/md7lXv/1
When there is missing $ at end
QString ext = "*.p" QString wildcard = QRegularExpression::wildcardToRegularExpression( ext ); QRegularExpression re(wildcard); QRegularExpressionMatch match = re.match("file.pro"); <- it has match
Attachments
For Gerrit Dashboard: QTBUG-72539 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
248301,6 | QRegularExpression: anchor wildcard pattern | 5.12 | qt/qtbase | Status: MERGED | +2 | 0 |
248334,2 | QQuickComboBox: update QRegularExpression wildcard code | 5.12 | qt/qtquickcontrols2 | Status: MERGED | +2 | 0 |
248335,2 | QMimeGlobPattern: update use of wildcardToRegularExpresion | dev | qt/qtbase | Status: MERGED | +2 | 0 |