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.

 View Only
Expand all | Collapse all

Find small character from incoming String.

  • 1.  Find small character from incoming String.

    Posted Tue September 10, 2013 09:40 AM

    Hi Experts,

    Stuck in silly problem. Require your help.

    I need to extract only small character from incoming string but unable to extract that. I tried through regular expression but couldn’t success in extract.

    Kindly share your suggestion.

    Regards,
    Kuldeep


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


  • 2.  RE: Find small character from incoming String.

    Posted Tue September 10, 2013 09:46 AM

    Can you tell us what that character is? Is it a special character?

    In a normal case you can use string services like indexOf and substring to extract a single character.


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


  • 3.  RE: Find small character from incoming String.

    Posted Tue September 10, 2013 09:50 AM

    Not a particular character but all small characters which are coming in string.

    Regards,
    Kuldeep


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


  • 4.  RE: Find small character from incoming String.

    Posted Tue September 10, 2013 09:55 AM

    Thanks Sreenivas!!!

    I already tried with indexOf and substring services but it is not sufficient for finding all small characters.

    Regards,
    Kuldeep


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


  • 5.  RE: Find small character from incoming String.

    Posted Tue September 10, 2013 10:36 AM

    It is a tricky one…

    Try the below logic it worked for me

    1)get the length of the string

    2)repeat over the length

    3)use substring to get the current character(by using beging index and end index increment them at the end of repeat)

    4)convert the currentchar to upper case using toUpper

    5)Branch on condition %currentchar% != %uppercasechar% and map the currentchar to string list and increnet string list indices.

    1. After all characters are repeated you will get all the small case characters into the string list.

    Attached is screen shot of the flow service


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


  • 6.  RE: Find small character from incoming String.

    Posted Tue September 10, 2013 10:45 AM

    Hi Kundleep

    Are trying to extarct small characters from example string "AsdfG mean you want “sdf”

    Is your question matches with above example?


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


  • 7.  RE: Find small character from incoming String.

    Posted Tue September 10, 2013 11:30 AM

    Too bad you are not working in a good programming language, like Natural :smiley:

    A single EXAMINE… DELETE would suffice.


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


  • 8.  RE: Find small character from incoming String.

    Posted Wed September 11, 2013 03:33 AM

    Thanks Sreenivas

    Your example solved the query. It helped me to understand how to implement basic logic in webMethods.

    @Steve: I’ll keep in mind for next time. Thanks.

    @Sai:- Yes above example solved query.


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


  • 9.  RE: Find small character from incoming String.

    Posted Wed September 11, 2013 08:42 AM