【发布时间】:2016-06-03 18:11:04
【问题描述】:
如何匹配一系列单词后跟一个不同于x 的单词?
例如,我如何匹配at the cost of 后跟与some 不同的单词?
我尝试了以下方法,但无济于事:
<rule id="AT_THE_COST_OF_!SOME" name="at the cost of !some">
<pattern>
<token>at</token>
<token>the</token>
<token>cost</token>
<token>of</token>
<token regexp="yes">/^((?!some).)*$</token>
</pattern>
<message>Did you mean <suggestion>at the cost of some \5</suggestion>?</message>
<example correction='at the cost of some efforts'>Yes, it comes
<marker>at the cost of efforts</marker>.</example>
</rule>
【问题讨论】:
标签: regex xml languagetool