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

[REBOL] Re: find/last/part behaviour

From: nitsch-lists:netcologne at: 23-Dec-2002 20:42

Hi Anton, Hallvard, Hallvard Ystad wrote:
>I've been checking file extensions like this: > >found? find skip tail filename -4 ".ext" >found? find skip tail filename -3 ".gz" >found? find skip tail filename -7 ".tar.gz" > >.. so as usual, there is a multitude of ways to do things. I like your way better, Anton, because it doesn't require a specification of how many characters to check (whereas I have to change the number of 'skip each time). >
And yet another way parse filename[thru ".ext"] ;)
>Merry X-mas, everyone. > >~H > >Dixit Anton (04.11 22.12.2002): > >>I usually use this to check the extension of a filename >>etc.: >> >> "" = find/last/tail "01234" "234" >> ;== true >>
Anton, eventually
>> find/last/tail "0123456" "234"
== "56"
>>
[snip] -volker