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

[REBOL] Re: Fast way to remove all non-numerical chars from a string

From: petr::krenzelok::seznam::cz at: 22-Sep-2007 14:17

Hi, well, as with REBOL, another, totally different aproach, the short one :-) start: now/time/precise loop 1'000'000 [remove-each val "1234a5b6v77" [any [val < #"0" val > #"9"]]] now/time/precise - start == 0:00:06.255 But - parse is usually the fastest method, otoh remove-each is native, it could compare rather well. Parse is more flexible for more complicated set-ups though ... Cheers, -pekr-