include::../description.adoc[] == Noncompliant Code Example [source,java] ---- "(?:number)\\d{2}" ---- == Compliant Solution [source,java] ---- "number\\d{2}" // it is anyway required "(?:number)?\\d{2}" // it is in fact optional ---- == Exceptions This rule does not report an issue if the non-capturing group is an alternation. [source,java] ---- "(?:number|string)" ---- include::../implementation.adoc[]