docs: static Matcher removeTrailingMatchAny(Matcher matcher) {
      if (matcher instanceof ZeroOrMoreMatcher) {
        ZeroOrMoreMatcher zm = matcher.as();
        boolean atEnd = zm.next() instanceof TrueMatcher || zm.next() instanceof EndMatcher;
        if (atEnd && zm.repeated() instanceof AnyMatcher) {
          return TrueMatcher.INSTANCE;
        }
      }
      return matcher;
    }