0
我正在使用正则表达式来查找答案的选择和他们的描述。 到现在为止工作很好,但问题是,我不知道如何包括多个行描述,而不包括下一个选择。需要帮助正则表达式
我现在的正则表达式:
^(Choice [A-I] \(.*\) +(?:is incorrect.)?($|\r?.*))
测试用例:
Choice B (Predominance of eosinophils) zfdfdfbhdfdfdf
fgdfgdfgdfdfdfhd fgdfgdfgdsgsf
sgsgdfgdf gdfgdfgdfgdfgd gdfg
Choice C (Monosodium urate crystals) fghfdghfghfghfh
Choice D (Spirochetes) is incorrect fghfghfghfghfghf
Choice E (Predominance of polymorphonuclear cells)
我需要两个随机文本的句子后,也包含在选择B匹配选择B,但不包括选项C.
工作就像魅力!在其他类似的情况下也使用这个原则。谢谢! –