Re: RegEx: odd number of slashes? and too many slashes?



Dan Wilkin <nibbles.bits@xxxxxxxxxxx> wrote in news:gmDug.3008$rT6.56
@trnddc03:

It looks like the regex engine is gobbling up slashes!! Perl 5.x


....

#my $altPath = '\\\\websrv\\VMServer\\cvs\\SAMS\\archives';
my $rootPath = '\\\\\\\websrv\\\VMServer\\\cvs\\\SAMS\\\archives';

/$rootPath(.+?)-arc - (.+)/o;

#!/usr/bin/perl

use strict;
use warnings;

use Data::Dumper;

my $path = '\\\\websrv\VMServer\cvs\SAMS\archives';
my $fn = "$path\\test.txt";

print "YES!\n" if $fn =~ /\Q$path\E/;

__END__

See perldoc perlop.

Sinan

--
A. Sinan Unur <1usa@xxxxxxxxxxxxxxxxxxx>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html

.



Relevant Pages