Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: matching and backreferencing filenames

by jethro (Monsignor)
on Sep 30, 2011 at 16:46 UTC ( #928855=note: print w/ replies, xml ) Need Help??


in reply to matching and backreferencing filenames

First of all '.' in your regex doesn't only match '.' but almost anything

If you have one filename per line and each starting at the beginning of the line, you don't need to constrain your search expression with \w, use the more general '.'

if ( $file =~ /(.+)\.(jpg|JPG|gif|GIF|wmv|WMV|mpg|MPG|avi|AVI)$/ )


Comment on Re: matching and backreferencing filenames
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2014-08-31 09:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls