This matches:

my $test_string = 'This is my test string';

my $pattern1 = 'This is';

print "Passed test 1 $/" if ($test_string =~ /$pattern1/);

I think that at least part of your problem is the '&&' characters. I'm guessing that you don't mean to match a literal '&&' but that is what your example pattern does.

You might want to look at perldoc perlre for some details on regexe's.

PC

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to