in reply to regular expression help
my @NetIncludeDir = qw(C:\VENDOR\MICROSOFT\PLATFORMSDK\INCLUDE); foreach my $file (@NetIncludeDir) { my($network, $path) = $file =~ m<^([\w:]+ (?:\\+ \w+) )(.*)>x; print "File: $file\nNetwork: $network, Path: $path\n"; } __output__ File: C:\VENDOR\MICROSOFT\PLATFORMSDK\INCLUDE Network: C:\VENDOR, Path: \MICROSOFT\PLATFORMSDK\INCLUDE
_________
broquaint
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: regular expression help
by Anonymous Monk on Jun 11, 2002 at 13:09 UTC |