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.
工作就像魅力!在其他類似的情況下也使用這個原則。謝謝! –