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 help

    Posted 05/05/10 03:57 PM

    Hi All,

    I am new to regular expressions. I need help in replacing few filenames.

    We have few filenames like abcd.txt.pgp, 1234.xxx.pgp, 4567.yyy.pgp

    I must replace the .txt.pgp from file1, .xxx.pgp from file2 and .yyy.pgp from file3 with nothing

    In simple terms, Can anyone of you help removing whatever is present after . (decimal). we have a common framework so the filenames will be input and we must remove whatever present after (.). So, there will be only one replace string service.

    Please help.
    David


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


  • 2.  RE: Regular Expression help

    Posted 05/05/10 04:47 PM

    If your file name pattern is always like this “abcd.txt.pgp”. Tokenize the file name with “.” delimiter access 0th element in the sting list and ignore others.


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


  • 3.  RE: Regular Expression help

    Posted 05/06/10 04:33 PM

    If you want to use a regular expression:

    Use the replace “WmPublic:pub.string:replace”
    with parameters:

    searchString = ..*
    useRegex = true

    ..* = a “.” to match the point and “.*” to match all caracters placed after the point.


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


  • 4.  RE: Regular Expression help

    Posted 05/10/10 11:36 PM