Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-9602

Regular expression search and doesn't remove replaced text properly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Not Evaluated Not Evaluated
    • Qt Creator 4.7.0-beta1
    • Qt Creator 2.7.1
    • Editors
    • None
    • Linux Mint Mate 14 64-bit

      Repro steps:

      • Start qtcreator
      • File / New File or Project...
      • General / Scratch Buffer
      • Create a line of text like this:

      __device_inline uint2 operator/(const uint2 a, const uint2& b)

      • Put the cursor before the text
      • Press Ctrl-F
      • Click the magnifying glass in the find field, choose Use Regular Expressions
      • Enter the following regex:

      (const (?:uchar|char|uint|int|float)\d\s?(?!&))

      • In the replace with field enter the following:

      \1&

      (backslash, one, ampersand, space)

      • Click Replace & Find

      Expected the line to be:

      __device_inline uint2 operator/(const uint2& a, const uint2& b)

      Actual incorrect replacement behavior:

      __device_inline uint2 operator/(const uint2 const uint2 a, const uint2& b)

      I've noticed several people report variations of this bug without detailed repro steps. Hopefully this time the bug will be fixed.

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

            con Eike Ziller
            doug65536 Doug Gale
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes