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

QRegExp Escaping special characters problems detecting word boundaries

    XMLWordPrintable

Details

    Description

      When using \b escaped special characters fail to match

      For Eample :

      QString test = QString("foo $40");
      test.replace(QRegExp("\\b\\$40
      b"), "foo");
      qDebug() << (test == "foo foo" ? "success" : "failure"); //failure

      Escaping a special character e.g.
      $ should make QRegExp see it as a normal character.

      This happens for all special characters except _

      Attachments

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

        Activity

          People

            stormols Marius Storm-Olsen
            dettman Dean Dettman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes