Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Re: Re: Searching file extensions

by broquaint (Abbot)
on Jun 19, 2003 at 12:05 UTC ( [id://267153]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Searching file extensions
in thread Searching file extensions

A simple use of grouping and alternation should do the trick e.g
print "$_ - ", ( /\.(?:html?|cfm|pl)$/ ? "yep" : "nope" ), "\n" for qw/ foo.pl bar.cfm baz.htm quux.xxx /; __output__ foo.pl - yep bar.cfm - yep baz.htm - yep quux.xxx - nope
See. perlre for more info on regexes.
HTH

_________
broquaint

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-26 06:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found