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
In reply to Re: regular expression help
by broquaint
in thread regular expression help
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |