给定文本
my $line = "[cytokine]<ADJVNT-PROP-0> signaling, which have not [to]<PREP> date been shown [to]<PREP> be [[regulat]<EXP-V-0>ed]<EXP-PP-V-0>";
my $line2 = "[Human [papillomavirus]<VACC-PROP-0>]<VACC-PROP-0> genotype [31]<NUM> does not [express]<EXP-V-0> detectable [microRNA]<MIR-0> levels [during]<PREP> latent or productive virus replication.";
我想要做的是删除所有不会<XXX>
导致此结果的内容:
Output 1: <ADJVNT-PROP-0><PREP><PREP><EXP-V-0><EXP-PP-V-0>
Output 2: <VACC-PROP-0><VACC-PROP-0><NUM><EXP-V-0><MIR-0><PREP>
但是为什么这个正则表达式失败了?正确的方法是什么?
s/[^<.*>]//g
这是完整的代码和可执行文件:https ://eval.in/50996