in reply to Extracting just the extension from a filename.
I'm certainly not a regex whiz, but this seems to do what you want. It will handles "."'s within the filename, and gives you the string after the last dot.$string =~ s/.*\.(.*)$/$1/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Extracting just the extension from a filename.
by Aristotle (Chancellor) on Jul 19, 2002 at 19:29 UTC | |
by dug (Chaplain) on Jul 19, 2002 at 19:44 UTC | |
by Aristotle (Chancellor) on Jul 19, 2002 at 19:53 UTC |