Error when using Perl regular expression (.*\\) with UE v25.20.0.60 to v25.20.0.72 (fixed)

Error when using Perl regular expression (.*\\) with UE v25.20.0.60 to v25.20.0.72 (fixed)

6
NewbieNewbie
6

    Sep 27, 2018#1

    Hi all,

    I'm trying to get the filename out of the string

    Code: Select all

    \\NFS\directory\userspace\aaaaaa.bbbb.ccc
    using the search and replace function:
    Search:

    Code: Select all

    .*\\(.*)\..*
    While

    Code: Select all

    .*\\
    works as expected (everything left of the filename is found), the RegEx above leads to error: "Invalid Regular Expression!"

    I do not see the mistake I made, and even

    Code: Select all

    (.*\\)
    brings up the same error.

    -> What am I doing wrong?

    (Btw: File is Windows-1252, RegEx mode is "Perl", UE 64-bit German Version 25.20.0.72)
    Regards, Max

    fleggy
    18171
    MasterMaster
    18171

      Sep 27, 2018#2

      Hi, it looks like that the pattern \\( is misinterpreted as \ and \(. Please send a message to IDM support. Meanwhile you can use this workaround to separate \ and (

      .*[\\](.*)\.

      BR, Fleggy

      Mofi
      6,567530
      Grand MasterGrand Master
      6,567530

        Sep 28, 2018#3

        Fleggy is absolutely right. The Perl regular expression search string .*\\(.*)\. is interpreted only by UltraEdit v25.20.0.60 to v25.20.0.72 as invalid expression. In UltraEdit v25.10.0.62 and all former versions this Perl regular expression search and replace works as expected.

        mststgt, please report this issue by email to IDM support to get if fixed as soon as possible, best with next released hotfix version of UE v25.20, because of this bug makes many Perl regular expression finds and replaces not working anymore.

        Of course I have reported this serious issue by email to IDM support, too.
        Best regards from an UC/UE/UES for Windows user from Austria

        mststgt
        6
        NewbieNewbie
        6

          Sep 28, 2018#4

          I reported the error, thanks for your help!

            Sep 28, 2018#5

            Made some more tests...
            Results in an error:

            Code: Select all

            (\\)
            Working as expected :

            Code: Select all

            \\\( 
            \\\)\(\)
            \(\)
            (\\+)
            (\\*)
            (\\{1})
            
            Finally, I chose to use

            Code: Select all

            .*\\{1}(.*)\..*
            to solve my problem :-)

              Sep 28, 2018#6

              The error is somewhere deeper in the code of UE, I'm afraid:
              After updating my macro with the command

              Code: Select all

              Find RegExp ".*[\\](.*)\..*"
              it is altered to

              Code: Select all

              Find RegExp ".*[\](.*)\..*"
              and even my favorite solution

              Code: Select all

              Find RegExp ".*\\{1}(.*)\..*"
              results in

              Code: Select all

              Find RegExp ".*\{1}(.*)\..*"
              😒
              Just reported that issue to IDM-Support, too.

              @Mofi Could you please check if this is also an error in earlier versions?
              Regards, Max

              Mofi
              6,567530
              Grand MasterGrand Master
              6,567530

                Oct 01, 2018#7

                mststgt, please take a look on my post at FindInFiles and ReplInFiles not correct compiled after creating/editing a macro with them with UE v25.00 (fixed) on editing macro code directly in Edit/Create Macro window. Some backslashes in find/replace strings and on other strings of the macro commands FindInFiles and ReplInFiles must be additionally escaped with one more backslash depending on next character to get them compiled correct into binary version of the macro.
                Best regards from an UC/UE/UES for Windows user from Austria

                mststgt
                6
                NewbieNewbie
                6

                  Oct 02, 2018#8

                  mststgt wrote:I'm trying to get the filename out of the string

                  Code: Select all

                  \\NFS\directory\userspace\aaaaaa.bbbb.ccc
                  using the search and replace function:
                  Search:

                  Code: Select all

                  .*\\(.*)\..*
                  While

                  Code: Select all

                  .*\\
                  works as expected (everything left of the filename is found), the RegEx above leads to error: "Invalid Regular Expression!"

                  I do not see the mistake I made, and even

                  Code: Select all

                  (.*\\)
                  brings up the same error.

                  -> What am I doing wrong?
                  Issue has been resolved in private user verification build UE 25.20.0.80.
                  Regards, Max

                  Mofi
                  6,567530
                  Grand MasterGrand Master
                  6,567530

                    Oct 02, 2018#9

                    I can report the same after receiving the email from IDM support asking for verifying the fix with user verification build 25.20.0.80. Perl regular expression search and replace strings are interpreted correct again like prior v25.20.0.60 with this private build of UltraEdit for Windows.

                      Oct 05, 2018#10

                      This issue is fixed with UltraEdit v25.20.0.88 public released on 2018-10-03.
                      Best regards from an UC/UE/UES for Windows user from Austria