[REBOL] Re: Building an Associate List from a string
From: tim:johnsons-web at: 20-Oct-2003 18:20
* Andrew Martin <[andrew--martin--colenso--school--nz]> [031020 18:12]:
Thanks Andrew! :-) Special thanks for the raise...
tim
> test: "age^-54^-name^-Tim
> Johnson^-occuptation^-coder^-Salary^-USD$100000.00"
> probe parse/all test [
> some [
> copy Word to tab skip (probe Word: to word! Word)
> [
> copy Value integer^ (Value: to integer! Value)
> | copy Value money^ (Value: to money! Value)
> | copy Value [to tab | to end]
> ] (probe Value)
> [tab | end]
> ]
> end
> ]
>
> halt
>
> You'll need my %Patterns.r script to get values for integer^ and money^
> (there's other patterns there as well). You need to put the above into a
> function and make 'Word and 'Value into local words and take out
> 'probe-s.
>
> I hope that helps!
>
> Andrew J Martin
> Attendance Officer
> Speaking in tongues and performing miracles
> Colenso High School
> Arnold Street, Napier.
> Tel: 64-6-8310180 ext 826
> Fax: 64-6-8336759
> http://colenso.net/scripts/Wiki.r?AJM
> http://www.colenso.school.nz/
>
> DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally
> liable) for materials distributed to or acquired from user e-mail accounts. You can
report any
> misuse of an e-mail account to our ICT Manager and the complaint will be investigated.
> (Misuse can come in many forms, but can be viewed as any material sent/received that
> indicate or suggest pornography, unethical or illegal solicitation, racism, sexism,
inappropriate
> language and/or other issues described in our Acceptable Use Policy.)
>
> All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0
> Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [postmaster--colenso--school--nz]
>
> --
> To unsubscribe from this list, just send an email to
> [rebol-request--rebol--com] with unsubscribe as the subject.
--
Tim Johnson <[tim--johnsons-web--com]>
http://www.alaska-internet-solutions.com