Tolgar
asked on
How can I get the word after the last slash of a string and remove the dots if there is any?
How can I get the word after the last slash of a string and remove the dots if there is any?
Example input:
Expected output:
Example input:
S:/some/path/to/file.x
Expected output:
file
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Ozo
perl -MFile::Basename -le "print scalar fileparse shift,qr/\..*/" S:/some/path/to/file.x