我有諸如數據:如何使用正則表達式提取否定句
實施例1
Barium swallow : There is slow transit to the stomach.
There is lots of other stuff going on.
There is no aspiration.
Conclusion: Appearances are consistent with achalasia.
實施例2
Barium swallow : There is slow transit to the stomach.
There is no evidence of achalasia here.
There is no aspiration.
Conclusion: Normal study
實施例3
Barium swallow : There is slow transit to the stomach.
There is no reflux.
There is no aspiration.
Conclusion: Possible achalasia
我想擺脫之間的詞但不限於一個行,以便與上面的例子中我得到
實施例1
Barium swallow : There is slow transit to the stomach.
There is lots of other stuff going on.
There is no aspiration.
Conclusion: Appearances are consistent with achalasia.
實施例2
Barium swallow : There is slow transit to the stomach.
There is.
There is no aspiration.
Conclusion: Normal study
實施例3
Barium swallow : There is slow transit to the stomach.
There is no reflux.
There is no aspiration.
Conclusion: Possible achalasia
要做到這一點(在R)我使用以下正則表達式:
[Nn]o.*[Aa]chalasia.*?(\\.\\n|\\.$)
然而與此我得到:
實施例1對
Barium swallow : There is slow transit to the stomach.
There is lots of other stuff going on.
There is no
實施例2
Barium swallow : There is slow transit to the stomach.
There is no aspiration.
Conclusion: Normal study
實施例3
Barium swallow : There is slow transit to the stomach.
There is no reflux.
There is no
所以,真正的一部分我感興趣的是在這之間的變化(即有......)之間的否和失弛緩症。在這裏,換新界線的比賽會停止嗎? –