Perl \b词锚定 结果不对 什么原因?代码:my $i=1;my $str="2 4 6 8 10 7";for ($i..10){if ($str=~/\b$i\b/g){print "$i is fine";}else{print "$i is not fine";};$i++;};结果:1 is not fine2 is fine3 is not fine4 is fine5 is not fine6 is fine7

来源:学生作业帮助网 编辑:作业帮 时间:2024/09/13 23:53:26
xRn@Q,T8/ åB\5%@H)-$ M)N(j Okl٢JyoJeqzdC~cC¦gM ȇ#l~/-zO!NMdZSvc[(R(qe zɂo"E/\syQ(rb**B,_-DA' [VH |0ѝ0ѴWĿ><`oD ƅ-a@}9L9N+ eƲ5>wTOGZ5 HbeO#mus