Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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
Replies are listed 'Best First'.
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 exploiting the Monastery: (5)
As of 2015-07-28 06:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (252 votes), past polls