Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Extracting file name from path

by ZZamboni (Curate)
on Jun 14, 2001 at 08:26 UTC ( [id://88293]=note: print w/replies, xml ) Need Help??


in reply to Extracting file name from path

As bikeNomad said, you are missing a backslash before the w for matching the extension. The following should work:
/.*\\(\w+\.\w{3})/;
Also take a look at File::Basename and File::Spec, which have different methods for splitting and massaging paths and filenames.

--ZZamboni

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2025-06-16 04:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.