$search_buffer="this text has teststring in it, it has a Test String too";
@waitfor=('Test string','some other string');
foreach my $test (@waitfor)
{
eval ('if (lc $search_buffer =~ lc ' . $test . ') ' .
'{' .
' $prematch = $`;' .
' $match = $&; ' .
' $postmatch = ' . "\$';" .
'}');
print "prematch=$prematch\n";
print "match=$match\n"; #I want to match both "teststring" and "Test String"
print "postmatch=$postmatch\n";
}
テスト文字列とテスト文字列の両方を印刷する必要があります。助けてもらえますか? ありがとう。