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

[REBOL] Second request for help: globbing on a block of filenames Re:

From: joel:neely:fedex at: 7-Sep-2000 11:40

One possible solution is:
>> stuff: [%cast.r %feedback.r %ftp.r %ftp.r~ %instinet.r %instinet.r~
[ %lconfig.r %lconfig.r~ %nntp.r %notes.html %rebdoc.r %dummy.ftp [ %dummy2.ftp~ %readby.ftp] == [%cast.r %feedback.r %ftp.r %ftp.r~ %instinet.r %instinet.r~ %lconfig.r %lconfig.r~ %nntp.r %notes.html %rebdoc.r %dummy.ft...
>> foreach thing stuff [
[ print [ [ thing "^-" [ either parse/all thing [thru "r~"] ["pass"]["fail"] [ ] [ ] cast.r fail feedback.r fail ftp.r fail ftp.r~ pass instinet.r fail instinet.r~ pass lconfig.r fail lconfig.r~ pass nntp.r fail notes.html fail rebdoc.r fail dummy.ftp fail dummy2.ftp~ fail readby.ftp fail
This depends on the fact that the parse only succeeds if it can find r~ and, in doing so, arrive at the end of the string. HTH, -jn- [princepawn--lycos--com] wrote: