good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^2: Regex To Remove File Extensionby grep (Monsignor) |
on Dec 10, 2008 at 21:09 UTC ( [id://729507]=note: print w/replies, xml ) | Need Help?? |
You're assuming too much, your regex will fail on:
and you'll get a bad result with *nix dotfiles
Focus on the requirements - 1) A file must contain an extension 2) the extension is everything following the final dot
grep One dead unjugged rabbit fish later...
In Section
Seekers of Perl Wisdom
|
|