如何编写正则表达式以删除某些特定选项卡后的句子?
例如富文本框中的我的文本
a 00001740 0.125 0 able#1 (usually followed by `to') having the necessary means or skill or know-how or authority to do something; "able to swim"; "she was able to program her computer"; "we were at last able to buy a car"; "able to get a grant for the project"
a 00002098 0 0.75 unable#1 (usually followed by `to') not having the necessary means or skill or know-how; "unable to get to town without a car"; "unable to obtain funds"
a 00002312 0 0 dorsal#2 abaxial#1 facing away from the axis of an organ or organism; "the abaxial surface of a leaf is the underside or side facing away from the stem"
本文来自 sentiwordnet。我想在第五个选项卡之后删除句子,例如应该省略单词able#1 句子(即它的光泽),然后在另一个单词无法#1 之后,它的光泽应该被省略。
什么将是它的正则表达式来消除 sentiwordnet 文本文件中单词的光泽。有什么办法可以做到这一点,或者有人可以为我制作一个小样本/空白吗?
输出应该是这样的:
a 00001740 0.125 0 able#1
a 00002098 0 0.75 unable#1
a 00002312 0 0 dorsal#2 abaxial#1