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

How to search wild-card string in String Array?

  • 1.  How to search wild-card string in String Array?

    Posted 05/22/07 12:45 AM

    Hi,

    I have two String Arrays and want to create key-value pairs. To build that I use value from first array and need to

    search for wild-card string on the second array.

    For example,

    My first array contains date&timestamp and second array contains list of files and files names embeds dataTimestamp.

    So, from first array for every value I need to search file names in second array and if I find matching value in

    second array then I will be creating key-value pairs i.e array-of-array and output from this will be mapped to String Table datatype in webMethods.

    This is how values in first and second array will look like. I can sort first array, but sort values for second array

    will not be same sequence with first array. Hence, I need to search. Both are String Arrays.

    Value from first array:
    20070521104242689

    Value from second array
    EDI204_CS00555470_20070521104242689.txt

    int index = Arrays.binarySearch(sortedArray, “*20070521104242689”);

    is not working for wild-card search.

    Can anyone please help.

    Thanks,
    Siva


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