I am trying to create a version of the standard language tool that fixes lowercase letters at the start of sentences, but wish to have exceptions. In this case, I want the antipattern to stop the rule working when I’m a Celebrity … Get Me Out of Here! is mentioned. I would expect this rule to work but it doesn’t. Why not?
<rule>
<antipattern>
<token>Here</token>
<token spacebefore="no">!</token>
<token regexp="yes" case_sensitive='yes'>([a-z]+)</token>
</antipattern>
<pattern>
<token postag="SENT_START"/>
<marker><token regexp="yes" case_sensitive='yes'>([a-z]+)</token></marker>
<message>Missing uppercase at the start of a sentence: <suggestion><match no="2" regexp_match="([a-z]+)" regexp_replace="$1" case_conversion="startupper"/></suggestion></message>
</pattern>
</rule>