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

After calling `search` function of String object, the property of global object RegExp does not effect.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 5.7.0
    • Quick: Other
    • None
    • Window 7 64 bits
      Qt 5.7.0 MinGW 32 bits
      QtQuick UI Project

    Description

      var str = "X98Y87Z65";
      var reg = /^X(\d+)Y(\d+)Z(\d+)$/;
      str.search(reg);
      print(RegExp.$1); // must be 98, but empty string
      print(RegExp.$2); // must be 87, but empty string
      print(RegExp.$3); // must be 65, but empty string

      After calling `search` function of String object, the property of global object RegExp does not effect.

      Attachments

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

        Activity

          People

            w00t Robin Burchell
            qyvlik qyvlik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes