Java Utililty Methods Wildcard

List of utility methods to do Wildcard

Description

The list of methods to do Wildcard are organized into topic(s).

Method

StringwildcardToCaseInsensitiveRegex(final String pattern)
wildcard To Case Insensitive Regex
if (pattern == null) {
    return null;
return "(?i)".concat(wildcardToRegex(pattern));
StringwildcardUserToSql(String exp)
Turn a user supplied wildcard expression with * into an SQL LIKE/NOT LIKE expression with %'s and other special characters.
StringBuffer sb = new StringBuffer();
for (int i = 0; i < exp.length(); i++) {
    String substring = exp.substring(i);
    if (substring.startsWith("*")) {
        sb.append("%");
    } else if (substring.startsWith("?")) {
        sb.append("_");
    } else if (substring.startsWith("\\*")) {
...