private static boolean versionMatches(String rawVersion, String segmentPattern) throws EnforcerRuleException {
        if (segmentMatches(rawVersion, segmentPattern)) return true;

        // Handle version ranges. Note that ArtifactMatcher treats a single version without brackets as a minimum version.
        if (! (segmentPattern.startsWith("[") || segmentPattern.startsWith("("))) return false;
        try {
            var range = VersionRange.createFromVersionSpec(segmentPattern);
            return ArtifactMatcher.containsVersion(range, new DefaultArtifactVersion(rawVersion));
        } catch (InvalidVersionSpecificationException e) {
            throw new EnforcerRuleException("Invalid version range: " + segmentPattern, e);
        }
    }
Matches simple glob like patterns using '?' and '*'
vespa-enforcer-extensions/src/main/java/com/yahoo/vespa/maven/plugin/enforcer/EnforceDependencies.java