Home TeamSite

Need help with excludepattern regex with OR operator

Hi,

 

We are using TS/OD 7.3.2 on Windows 2008.

Idea is to have common OD config file for deployments and pass srcarea, destarea and exlude folders as parameters.

 

OD config file entry
---------------------
<targetRules>
      <filters>
            <excludepattern regex="$targetexcludes^">
      </filters>
</targetRules>


From Java Code
-------------------
targetexcludes = "^(?i)(first|second|third|fourth)/?$"; // these are the folder names, i am trying to dynamically form this string/regex.
Also tried escaping '|' with 1 and 2 slashes.

What log shows
-----------------
deployment=.InternalStageWebDeploy.WebRootDeployment.int-web-staging
    file_list=D:/Interwoven/TeamSite/tmp/webdeploy\GLOBAL_usdf-iwui_webfilelist_11443.txt
    area=Y:\default\main\Active\ostene\WORKAREA\ostene
    local_directory=.
        source_exclude=dir1
        source_exclude=dir4
        destination_exclude_pattern="^(?i)(first"
       
    ;
;
LIB: 2015-05-08 11:44:42  ERROR: Bad dest exclude regular expression ^(?i)(first

 

Thanks in advance.

Comments

  • It looks like you need to escape the pipe characters in some way. Are you using the CLT or the OD API?

  • Thank you for inquiring.

     

    I am using OD API.

    Tried escpaing '|' characters with 1 (\) , 2(\\) and 3(\\\) slashes with no luck.

     

     

  • On the off chance that still forks to a cmd handler, and since you're on windows, does this work:

     

    targetexcludes = "\"^(?i)(first|second|third|fourth)/?$\"";

  •  

    Still the same error.

     

    deployment=.InternalStageWebDeploy.WebRootDeployment.int-web-staging
        file_list=D:/Interwoven/TeamSite/tmp/webdeploy\GLOBAL_usdf-iwui_webfilelist_13384.txt
        area=Y:\default\main\Active\ostene\WORKAREA\ostene
        local_directory=.
            
            destination_exclude_pattern="^(?i)(first"
            

    ENG: -------------------------------------------------
    ENG: Thread-120 End of internal config file [D:\Interwoven\OpenDeployNG\db\.InternalStageWebDeploy.WebRootDeployment.int-web-staging]

    ENG: Thread-120 exiting  initial
    ENG: Thread-120 entering setup
    LIB: 2015-05-19 13:38:54   LOGFILE=[D:\Interwoven\OpenDeployNG\log\src.InternalStageWebDeploy.WebRootDeployment.USBDTMSITE101.to.int-web-staging.log]
    LIB: 2015-05-19 13:38:54   Locale=[[email protected]]
    LIB: 2015-05-19 13:38:54  ERROR: Bad dest exclude regular expression ^(?i)(first

Sign In or Register to comment.