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

Re^3: Dealing with split

by dsb (Chaplain)
on Feb 23, 2006 at 16:10 UTC ( #532304=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Dealing with split
in thread Dealing with split

You can tweak the regex to match all extensions or feed it an alternation that will find only certain extensions.

# match any file extension print map {"$_\n" if s/c:\\temp(.*?\.(?:\w|\d)+?)/$1/} split(/\s+|\@+/ +,$str); # match only a few extensions print map {"$_\n" if s/c:\\temp(.*?\.(?:c|xml|java|etc))/$1/} split(/\ +s+|\@+/,$str);
I think you'd be better of using runrig's snippet at Re: Dealing with split, though.


dsb
This @ISA my( $cool ) %SIG


Comment on Re^3: Dealing with split
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://532304]
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: (7)
As of 2015-07-04 21:37 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 (60 votes), past polls