Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Newbie parsing problem (cont'd)

From: pyxos::netcourrier::com at: 29-Mar-2002 23:43

Thanks a lot Gregg, I'll try it on tuesday. Happy Easter ----Message d'origine----
>De: =22Gregg Irwin=22 <greggirwin=40mindspring.com> >A: <rebol-list=40rebol.com> >Sujet: =5BREBOL=5D 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 =22:request=22...>> > >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: =5B > =7BGetActiveAccounts:request = activeaccounts=7D > =7BGetTransactions:request = ocodereview=7D > =7BShouldn't see this:no match here = invalid record=7D > =7BCancelAccount:request = cancelacc=7D >=5D > >foreach item data =5B > if loc: find item =22:request=22 =5B > print copy/part item subtract index? loc 1 > =5D >=5D > >HTH=21 > >--Gregg > >-- >To unsubscribe from this list, please send an email to >rebol-request=40rebol.com with =22unsubscribe=22 in the >subject, without the quotes. >
------------------------------------------------- =22Sound Mind, Sound Body=22 Juv=E9nal =22Lire et =EAtre curieux, c'est la m=EAme chose=22 Pascal Quignard =22Qui triomphe de lui-m=EAme poss=E8de la force=22 Lao-Tseu, extrait du Tao Te King =22Dans la course =E0 la qualit=E9, il n'y a pas de ligne d'arriv=E9e=22 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=E9l=E9phone/Fax : 08 92 69 00 21 (0,34 =80 TTC/min) Minitel: 3615 NETCOURRIER (0,15 =80 TTC/min)