Click to See Complete Forum and Search --> : Function to Extract values from string


Foundas
07-26-2007, 07:52 AM
hello all,

i have the following string: status=1&newstatus=9&message=SENT-91100000,7272YGH90-9133449811100001,7282GHY9-92323232319811101,7282GHY8~DESTERR-919811200000,919811300000


from this string, i wish to extract the values after the "," and before the "~"

in this case, the output for 3 variables should be:
first variable: 7272YGH90
second variable: 7282GHY9
third variable: 7282GHY8

the length of the variable is 9 digits, the length of the variable before the "," can be of any size


Can you please advice on how to handle this?

thanks in advance

Foundas

jackoconnell
07-26-2007, 07:11 PM
Break at commas, then break each result at the ~ or - individually