public static Predicate<String> ofGlob(final String pattern) {
        return ofRegex(
			"^" +
				Pattern.quote(pattern)
					.replace("*", "\\E.*\\Q")
					.replace("?", "\\E.\\Q") +
				"$"
		);
    }
Creates a predicate that tests if the {@code pattern} matches a given
input string.

@param pattern the matching regular expression
@return a matching predicate for the given pattern
jenetics.incubator/src/main/java/io/jenetics/incubator/beans/Filters.java