Uploaded image for project: 'YADE - Managed File Transfer'
  1. YADE - Managed File Transfer
  2. YADE-639

Rename/ReplaceWhat pattern .* causes double replacement

    XMLWordPrintable

Details

    Description

      Current Situation

      • YADE supports renaming files during transfer from a source system to a target system.
      • The ReplaceWhat element expects a regular expression that matches the file name.
        • If the regular expression is defined as .* (match the entire file name), the replacement is applied twice.
        • As a result, the replaced file name is duplicated.
        • Example:
          • ReplaceWhat = .*
          • ReplaceWith = XYZ
          • Resulting file name: XYZXYZ

      Desired Behavior

      • When ReplaceWhat = .* is used, the file name should be substituted exactly once.
      • Example above - the resulting file name should be: XYZ

      Workaround

      • Use a capturing group to ensure a single replacement:
        ReplaceWhat = (.*)

      Patch

      • Use the cumulative patch provided with YADE-637.

      Attachments

        Activity

          People

            re Robert Ehrlich
            re Robert Ehrlich
            Rajrani Upadhyay Rajrani Upadhyay
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: