I am trying to write an extension, which will highlight some words in email (Contextual Add-in). For example, I need to highlight "under" word, but not "underscore". I tried to use that regex construction - under(?!score), but it didn't work, despite the fact it generally works in regex testers. Do you know how to implement that regex in Office Add-in? Thanks.
UPD: I realised, that I didn't provide all necessary data. Code with regex is in manifest.xml of Office Add-in.
Regex part is:
<ExtensionPoint xsi:type="DetectedEntity">
<Label resid="contextLabel" />
<SourceLocation resid="ITermUrl" />
<Rule xsi:type="RuleCollection" Mode="And">
<Rule xsi:type="ItemIs" ItemType="Message" />
<Rule xsi:type="ItemHasRegularExpressionMatch" RegExName="ITerm" RegExValue="under(?!score)" PropertyName="BodyAsPlaintext" IgnoreCase="true" />
</Rule>
</ExtensionPoint>
Result is:
I don't want to highlight "underscore". Only "under" or "under score".