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

QRegExp::escape() function does not escape hyphen

    XMLWordPrintable

Details

    Description

      QRegExp::escape() does not escape hyphen character even it has a special meaning inside square brackets.

      For example, I want to search for 3 characters, 'a', '-' and 'b'. The regexp string "[a-b]" won't work, because in this context the hyphen has a
      special meaning. Of course [ab-] or [-ab] will work but when the search pattern is created dynamically would be nice to use escape function.

      Attachments

        For Gerrit Dashboard: QTBUG-39408
        # Subject Branch Project Status CR V

        Activity

          People

            anylitok Antti Yli-Tokola (Inactive)
            anylitok Antti Yli-Tokola (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes