Bug in Perl regular expression replace function of UE v25.20.0.60 to v25.20.0.88 (fixed)

Bug in Perl regular expression replace function of UE v25.20.0.60 to v25.20.0.88 (fixed)

6
NewbieNewbie
6

    Oct 06, 2018#1

    In a file that contains this line:

    Code: Select all

    S[]=Fabcdx;  S[];
    Using Perl syntax.

    Find pattern: \[(\].+?\[)

    Replace pattern: [1\12

    Or: \[1\12

    should give:

    Code: Select all

    S[1]=Fabcdx;  S[2];
    But the result is:

    Code: Select all

    S[1
    ];
    The hex is: 53 58 31 0A 5D 38 0D 0A

    Is this a bug? Or is my regular expression at fault?

    19476
    MasterMaster
    19476

      Oct 06, 2018#2

      Hi jimvj,

      It is a bug - the replace subpattern \12 is misinterpreted as some ASCII control code instead of group 1 and number 2. Please, send a bug report email to IDM support.

      Meanwhile you can use this workaround:

      Find: \[(\].+?)\[
      Replace:  [1\1[2

      BR, Fleggy

      6
      NewbieNewbie
      6

        Oct 06, 2018#3

        Thanks. I will send in a bug report.

        6,681583
        Grand MasterGrand Master
        6,681583

          Oct 06, 2018#4

          I confirm this bug of UltraEdit v25.20.0.60 to v25.20.0.88. Former versions of UltraEdit for Windows execute the Perl regular expression replace right as expected.

          It looks like this is a similar issue to Error when using Perl regular expression (.*\\) with UE v25.20.0.60 to v25.20.0.72 (fixed) for the replace string. As I verified the fix of this issue, I tested also replace strings with \1, but none with \1 and one more digit.

          Please report this bug quickly to IDM support by email to get it as fast fixed as the last Perl regular expression issue.

            Jan 23, 2019#5

            This bug is fixed in UltraEdit for Windows v25.20.0.156 which is the next public released hotfix version after v25.20.0.88. I highly recommend an update to UltraEdit version 25.20.0.156 by all users using at the moment an UltraEdit 25.20 build as soon as possible.
            Best regards from an UC/UE/UES for Windows user from Austria