This regex should find java classes witch no '@Configuration' word and more than one '@Inject' word. In java Matcher it works, but not in checkstyle.
<module name="RegexpMultiline">
<property name="format" value="(?s)((?!@Configuration).)*@Inject.*@Inject.*"/>
</module>
In this example result is false, but if u delete @Configuration
from target text then result is true - good. Checkstyle always produces true.