in reply to regular expression help

Hmmm that regex looks familiar ;-)
The problem is that you're still treating it like a network path instead of a file path. Here's a slight mod that should make it do what you want
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

HTH

_________
broquaint

Replies are listed 'Best First'.
Re: Re: regular expression help
by Anonymous Monk on Jun 11, 2002 at 13:09 UTC
    It should, its some of your code :) I thought I code just revise some of your code from our previous discussion, but I think I am making things to complicated. Thanks Again!