in reply to Re: Re: filtering folder path using regex.
in thread filtering folder path using regex.
In this one [\\] would match just backslashes, but with the ^, [^\\], matches all characters Except backslashes, and because of the +, it matches as much as possible up to the 1st backslash. $2 is populates, because the character class (ie. [^\\]) is in parenthesis, which happens to be the second set of them, so therefore is stored in $2$path =~ /^(\w):\\([^\\]+)\\?/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: filtering folder path using regex.
by blackadder (Hermit) on Jul 14, 2003 at 20:57 UTC |