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 question - NOT begin with certain char & not contain hyphen

    Posted 03/27/12 01:24 AM

    I’ve been struggling with trying to put together a regex and so now I’m looking for assistance. For example if I loop over vars that contains the below:

    17581-2
    16789
    G18088494

    I want to do a BRANCH step and state in a sequence step that it should match on the one that does NOT start with the character “G” and does NOT contain a hyphen. Criteria is both must not be in the var. In the above example, it would match on only 16789.

    How can I do that?

    Thanks.


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


  • 2.  RE: Regular expression question - NOT begin with certain char & not contain hyphen

    Posted 03/27/12 06:00 AM

    You can make use of pub.string:indexOf service. If String contains ‘G’ at the start it will return its index as 0, based on the result you can branch. Same will hold good for searching ‘-’ in the string.

    HTH!


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


  • 3.  RE: Regular expression question - NOT begin with certain char & not contain hyphen

    Posted 03/27/12 12:41 PM

    Validate loop using branch steps with regular expressions.

    use “^” for starting with char and “.” for any alphanumerical chars for a string

    cant able to work out with above, let me know…


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


  • 4.  RE: Regular expression question - NOT begin with certain char & not contain hyphen

    Posted 03/27/12 03:39 PM
    BRANCH on 'yourVar'
    /^G/: SEQUENCE (Ignore entries beginning with G)
    /-/: SEQUENCE (Ignore entries containing '-')
    $default: SEQUENCE (Entry does not start with G nor contain '-' so proceed)

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


  • 5.  RE: Regular expression question - NOT begin with certain char & not contain hyphen

    Posted 03/29/12 07:43 AM

    /^G|[-]/: SEQUENCE (Entry start with G or contain ‘-’) $default: SEQUENCE (Entry does not start with G nor contain ‘-’ so proceed)


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


  • 6.  RE: Regular expression question - NOT begin with certain char & not contain hyphen

    Posted 03/29/12 07:44 AM

    /^G|[-]/: SEQUENCE (Entry start with G or contain ‘-’) $default: SEQUENCE (Entry does not start with G nor contain ‘-’ so proceed)


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


  • 7.  RE: Regular expression question - NOT begin with certain char & not contain hyphen

    Posted 03/29/12 12:59 PM

    THANKS Everybody for your suggestions! I’m good to go now.


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