in reply to Re^3: How to validate windows path
in thread How to validate windows path
Please advise - as i wrote i get Path from the user and i need to print error if isn't valid path.my $dir = "c:\\temp\\%1111 323232?"; if ($dir =~ m/^[a-z]:\\(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\r\n]*$/i) { print "Valid Path\n"; } else { print "Not Valid Path\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How to validate windows path
by tobyink (Canon) on Mar 13, 2012 at 21:28 UTC | |
|
Re^5: How to validate windows path
by MidLifeXis (Monsignor) on Mar 13, 2012 at 18:40 UTC |