我的数据看起来像Perl的正则表达式
NC_004415 NC_010199 ([T(trnH ,trnS1 trnL1 ,)])
NC_006131 NC_010199 ([T(trnH ,trnS1 trnL1 ,)])
NC_006355 NC_007231 ([T(trnM ,trnQ ,)])
我想捕捉[]之间的一切;
while(my $line = <crex>)
{ $t=$line=~m/(\[.*\])/;
print $t;
}
}
$ t的输出是1!为什么它不工作
我不能帮助perl,但你的表情很好。问题在于你的代码。 –
另外,你有一个额外的尾随大括号。 – nneonneo