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

Example Project "Custom Sort/Filter Model Example" has broken QRegExp

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.12.0 Alpha
    • 5.8.0
    • Examples and Demos
    • None
    • b3bbba7b871144c5d6f4b1a432f5c2cce02e321f

    Description

      The regular expression "emailPattern" has no opening parenthesis for the capture group:
      {{ static QRegExp emailPattern("\\w\\.@[\\w
      .|file://w//]
      "); }}
      should be
      {{ static QRegExp emailPattern("(\\w\\.@[\\w
      .|file://w//])
      "); }}
       

      Alternatively, the capture group could be omitted but then the subsequent extractions of the email text must match the whole regexp: cap(0) instead of cap(1). The later solution is probably better because it is simpler.

       

      Regards,

      Stuart

      Attachments

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

        Activity

          People

            chehrlic Christian Ehrlicher
            stuartredmann Stefan Ensslen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes