Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Reaped: Re: Regex To Remove File Extension

by NodeReaper (Curate)
on Dec 05, 2010 at 07:48 UTC ( #875466=note: print w/ replies, xml ) Need Help??


in reply to Regex To Remove File Extension

This node was taken out by the NodeReaper on Dec 05, 2010 at 15:13 UTC
Reason: [BrowserUk]: spam: reap

You may view the original node and the consideration vote tally.


Comment on Reaped: Re: Regex To Remove File Extension
Re: Reaped: Re: Regex To Remove File Extension
by Anonymous Monk on Jun 09, 2014 at 21:49 UTC

    What about doing this:

    $filename =~ /(.*)\./; my $basename = $1;

    Since the regex above is greedy, it should capture everything up to the last period. It seems to work for me. Am I missing something?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://875466]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (11)
As of 2014-12-19 21:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (92 votes), past polls