Thanks a lot Gregg, I'll try it on tuesday.
Happy Easter
----Message d'origine----
>De: "Gregg Irwin" <[EMAIL PROTECTED]>
>A: <[EMAIL PROTECTED]>
>Sujet: [REBOL] Re: Newbie parsing problem (cont'd)
>Date: Fri, 29 Mar 2002 12:17:15 -0700
>
>Hi Richard,
>
><< I have a file containing data as below :
>
>GetActiveAccounts:request = activeaccounts
>GetTransactions:request = ocodereview
>CancelAccount:request = cancelacc
>
>In my code, I try to catch everything before ":request"...>>
>
>I think PARSE is one of REBOL's greatest features, but for simple splitting
>there are other options as well, which are sometimes a little more
>straight-forward. I don't know if this will suit your needs, but it shows
>how you can use FIND and COPY/PART to do what you want. It should be easily
>generalized as well.
>
>data: [
> {GetActiveAccounts:request = activeaccounts}
> {GetTransactions:request = ocodereview}
> {Shouldn't see this:no match here = invalid record}
> {CancelAccount:request = cancelacc}
>]
>
>foreach item data [
> if loc: find item ":request" [
> print copy/part item subtract index? loc 1
> ]
>]
>
>HTH!
>
>--Gregg
>
>--
>To unsubscribe from this list, please send an email to
>[EMAIL PROTECTED] with "unsubscribe" in the
>subject, without the quotes.
>
>
-------------------------------------------------
"Sound Mind, Sound Body" Juv�nal
"Lire et �tre curieux, c'est la m�me chose" Pascal Quignard
"Qui triomphe de lui-m�me poss�de la force" Lao-Tseu, extrait du Tao Te King
"Dans la course � la qualit�, il n'y a pas de ligne d'arriv�e" David Kearns
Allez voir mon site : http://www.desala.org
-------------------------------------------------------------
NetCourrier, votre bureau virtuel sur Internet : Mail, Agenda, Clubs, Toolbar...
Web/Wap : www.netcourrier.com
T�l�phone/Fax : 08 92 69 00 21 (0,34 � TTC/min)
Minitel: 3615 NETCOURRIER (0,15 � TTC/min)
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.