perl -e 'my @pathandfile = qw(c:\d1/d2/f1.txt c:\d1/d3/f2 c:\d1\d2\f4 +c:\d1\d2\d3\f5); for (@pathandfile){print "PATH: $1 - FILE: $2\n" i +f /(.*)[\\|\/]([^\/|^\\]+)$/;}'
In reply to Re^2: pattern matching question
by smokemachine
in thread pattern matching question
by devlele
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |