我希望你能指导我,我做错了。
我有例如:
my $text = "<some tag> stuff here> </some tag> mer mer <some tag> 'more stuff' </some tag>";
@b =($text =~ m/s(.)uff/gsi);
print "array B, size: ", @b+0, ", elements: ";
print join (" ,", @b);
print "\n";
@c =($text =~ m/<some tag>(.+)<\/some tag>/g);
print "array C, size: ", @c+0, ", elements: ";
print join (", ", @c);
print "\n";
输出如下:
array B, size: 2, elements: t ,t
array C, size: 1, elements: stuff here> </some tag> mer mer <some tag> 'more stuff'
我对数组 C 的输出感兴趣
size 2: , elements stuff here , 'more stuff'
为什么它会跳过它?