good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Regex To Remove File Extensionby kennethk (Abbot) |
on Dec 10, 2008 at 19:03 UTC ( [id://729480]=note: print w/replies, xml ) | Need Help?? |
You could try s/(.*)\..*/$1/, which will greedily match up to the last '.' and then keep that part. For common regexes, you should probably also check out Regexp::Common.
In Section
Seekers of Perl Wisdom
|
|