private static boolean isValidCaptureRestPattern(String pathPattern) {
        final Matcher matcher = CAPTURE_REST_PATTERN.matcher(pathPattern);
        if (!matcher.find()) {
            // Return true if the path does not include the capture rest pattern.
            return true;
        }
        final String paramName = MoreObjects.firstNonNull(matcher.group(1), matcher.group(2));
        // The variable name must be at least a character of alphabet, number and underscore.
        if (!CAPTURE_REST_VARIABLE_NAME_PATTERN.matcher(paramName).matches()) {
            return false;
        }
        // The capture rest pattern must be located at the end of the path.
        return pathPattern.length() == matcher.end();
    }
Return true if the capture rest pattern specified is valid.
core/src/main/java/com/linecorp/armeria/server/ParameterizedPathMapping.java