in reply to Re: Re: Extract string from rear of string
in thread Extract string from rear of string

..or more than one dot... like linux-2.4.17.tar.gz

Replies are listed 'Best First'.
(ichimunki) Re x 4: Extract string from rear of string
by ichimunki (Priest) on Dec 28, 2001 at 22:49 UTC
    Begging your pardon, but the split shown returns the last bit of stuff after the final dot, which I think complies with the rather vague request of getting the extension. In your example, the extension is 'gz' after all. That's the beauty of negative indices, they work from the other end.