"Bullock, Howard A." wrote:
>
> Is there a way to get the following text to match? If the '\' in '1\V' is
> changed, the regex matches. I would like to maintain the RAW text if
> possible.
>
> $c = 'JUA_APPS01\VOL1:\APPS';
> $d = 'JUA_APPS01\VOL';
> if ($c =~ /$d/)
> {
> print "matched\n";
> }
> else
> {
> print "Not Matched\n";
> }
my $c = 'JUA_APPS01\VOL1:\APPS';
my $d = 'JUA_APPS01\VOL';
if ($c =~ /\Q$d\E/) {
print "matched\n";
} else {
print "Not Matched\n";
}
Or use quotemeta on string $d.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / ) // // DBE Collectibles http://www.todbe.com/
/ ) /--< o // // Mailto:[EMAIL PROTECTED] http://dbecoll.webjump.com/
-/-' /___/_<_</_</_ http://www.freeyellow.com/members/dbecoll/
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users