Re: RegEx: odd number of slashes? and too many slashes?
- From: "A. Sinan Unur" <1usa@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 17 Jul 2006 05:44:24 GMT
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
.
- References:
- RegEx: odd number of slashes? and too many slashes?
- From: Dan Wilkin
- RegEx: odd number of slashes? and too many slashes?
- Prev by Date: Re: Module::Build / version / cpan / tail chasing
- Next by Date: CGI: Running a forked background process
- Previous by thread: Re: RegEx: odd number of slashes? and too many slashes?
- Next by thread: CGI: Running a forked background process
- Index(es):
Relevant Pages
|