IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Regular expression to avoid some files from the folder

    Posted 05/08/09 07:31 AM

    Hi,

    I have a requirement to avoid the files which start with AA and XAA from the given folder. I am using listFilesInDirectory service to fetch the files. I can substring the file name and then put a condition to avoid the files. But i want to use regular expression in listFilesInDirectory service, so that i can get the files which doesnot start with AA or XAA.
    I have tried with [^AA]|[^XAA] but didnt work out.

    Please provide your suggetions…

    Thanks in advance.

    Regards,
    Vas


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 2.  RE: Regular expression to avoid some files from the folder

    Posted 05/08/09 04:09 PM

    I don’t have a solution for you but keep in mind that […] indicates a set, not a sequence. Thus, [^XAA] means doesn’t start with X or A or A.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 3.  RE: Regular expression to avoid some files from the folder

    Posted 05/08/09 04:54 PM

    Try setting a branch to say <> /^XAA/ (Use slashes / not brackets )

    Using /^XAA/ means select switch that starts with “XAA”. So by putting the not equals in front of it you should get a selection that does not begin with “XAA”


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 4.  RE: Regular expression to avoid some files from the folder

    Posted 05/08/09 06:02 PM

    Sorry I missed this before. The listFilesInDirectory service (from WmSamples) does not support the use of regular expressions. It supports ? and * wildcards only.

    Your options:

    • Use the regex matching of BRANCH steps as jday suggests to filter the list in a FLOW service.

    • Locate or write your own FilenameFilter class to support regex to use in your own listFiles service.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods