I think you were talking about this one:
$path =~ /^(\w):\\([^\\]+)\\?/;
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 | [reply] [d/l] [select] |
Spot on with your explanation kind sir.
[] and ^ means all Except backslashes,...I confused it with ^ as an anchor or start of a word boundary....I should’ve been more careful when constructing a Regex expressions!…
Thanks for reminding me....
& I should always keep practice coding.
| [reply] [d/l] |