static Matcher removeRepeatedStart ( Matcher matcher ) { if ( matcher instanceof ZeroOrMoreMatcher ) { ZeroOrMoreMatcher zm = matcher . as ( ) ; if ( zm . repeated ( ) instanceof StartMatcher ) { return zm . next ( ) ; } } return matcher ; }
Zero or more start anchors is the same as not being anchored by the start .