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

[REBOL] Re: 'extract - reply to Andrew

From: g:santilli:tiscalinet:it at: 17-Dec-2000 14:19

Hello Shannon! On 17-Dic-00, you wrote: SB> source: "User1234<WON:387463>202.76.345.2" ;This string SB> contains several discreet integers! SB> extract source integer! == [1234 387463 202 76 345 2] How could EXTRACT decide if User1234 is a word or if User is a word and 1234 is an integer? Should it treat <WON:387463> as a tag or as the set-word WON: followed by the integer 387463? I don't think this is "a simple thing". Anyway, if you want to search for a certain datatype in a block, FIND works:
>> find [word 1234 12.23.34] integer!
== [1234 12.23.34]
>> find [word 1234 12.23.34] word!
== [word 1234 12.23.34]
>> find [word 1234 12.23.34] tuple!
== [12.23.34] Regards, Gabriele. -- Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/