Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-81221

QRegularExpression: "(?)" in a pattern is useless but not reported invalid

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.14
    • Core: Other
    • None
    • All

    Description

      A pattern containing "( ? )" (the spaces are added to display ? correctly in this nice HTML editor/whatever) isn't reported an invalid by QRegularExpression, which is technically correct, but it's useless as it doesn't do anything and indicates that the user is somehow making a mistake.

      IIUC, "( ? )" might be treated like (?is), but since it's empty it doesn't have any effect. I don't know how to best handle that, it is valid, but not "correct". (Not really a bug report, sorry).

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            peppe Giuseppe D'Angelo
            ahmad.samir Ahmad Samir
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes