in reply to Re: Help with a small regex
in thread Help with a small regex
I don't see why hippo's second second suggestion above (the OTOH one) would not cover all your cases:
(BTW: My own preference for the regex expression would be m{ \A / }xms rather than /^\//)c:\@Work\Perl\monks>perl -wMstrict -le "for my $path ( 'scp', 'sss40s1u01:/home/example/test.txt', '/home/example/testdir' +, @ARGV, ) { print qq{'$path' matches} if $path =~ /^\//; } " "/any" "/other/examples" '/home/example/testdir' matches '/any' matches '/other/examples' matches
Give a man a fish: <%-(-(-(-<
|
|---|