private static void validatePath(String path) {
        CommonHelper.assertNotBlank("path", path);
        if (!path.startsWith("/")) {
            throw new TechnicalException("Excluded path must begin with a /");
        }
    }
<p>setExcludedPattern.</p>

@param regularExpression a {@link String} object
pac4j-core/src/main/java/org/pac4j/core/matching/matcher/PathMatcher.java