Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 cooling their heels in the Monastery: (9)
As of 2016-09-29 20:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (560 votes). Check out past polls.