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
Expand all | Collapse all

Using regular expressions to extract a value from a field

  • 1.  Using regular expressions to extract a value from a field

    Posted 07/15/02 08:23 PM

    I am trying to take an inbound field that may or may not contain a part number, and may or may not contain additional text (it can essentially contain anything, so I would search the entire field). I want to search the field for a pattern, not a specific part number (so I am looking for #AA#A where # is a number, and A is alpah-numeric). If the pattern is found, I will extract it and map it to the appropriate field. But I am having difficulty extracting it.

    I am using the indexOf service. The inString field is the one I want to search for a part number pattern. The substring is a regular expression. I currently tried a test from the wM users guide {doc.p[/web.ethods/].text}, that came back null.

    I am getting a -1 (not finding the string) for this. Any thoughts on how I can extract this data correctly?


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


  • 2.  RE: Using regular expressions to extract a value from a field

    Posted 07/15/02 08:56 PM

    I am getting nothing…
    /\d\w\d\d\d/ and
    \d\w\d\d\d

    That should be the correct expressions for number only (\d) and alphanumeric (\w). I am not getting any value returned???


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