Jw, also, since your string looks a lot like a CGI value string, you might try using:
decode-cgi
It will return a block of words and values:
block: decode-cgi your-string
foreach [word value] block [print [word value]]
If you DO the result, then you will set the words to the values:
do decode-cgi your-string
print barcode_number
That should produce a result nearly identical to what you've written below, but takes
just one line (JOL).
You can also have a look at the source code to decode-cgi to see how it uses parse and
get some ideas:
source decode-cgi
Just a thought that came to mind...
-Carl
***Docs: we should mention some of these other parse-like functions in the parse
chapter.
At 11/30/99 04:04 PM -0800, you wrote:
>Thanks for all the help - I came up with some code that works for me using
>parse:
>
>foreach line read/lines %inbox.txt [
> if found? find line "item_desc=" [
> parse line [
> thru "item_desc=" copy item_desc to "&barcode_number="
> thru "&barcode_number=" copy barcode_number to "&serial_number="
> thru "&serial_number=" copy serial_number to "&percent_discount="
> thru "&percent_discount=" copy percent_discount to "&dollar_discount="
> thru "&dollar_discount=" copy dollar_discount to "&sale_type="
> thru "&sale_type=" copy sale_type to "&house_work="
> thru "&house_work=" copy house_work to "&instore_time="
> thru "&instore_time=" copy instore_time to "&expiration_date="
> thru "&expiration_date=" copy expiration_date to end
> ]
>
>easy as pie once you know what parse does!
>
>-later, jw
>
>
>--
>stay fun.
>