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.
dsb
This @ISA my( $cool ) %SIG
I think you'd be better of using runrig's snippet at Re: Dealing with split, though.# 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);
dsb
This @ISA my( $cool ) %SIG
|
---|
In Section
Seekers of Perl Wisdom