docs: public static boolean nameMatch(String regex, String name) {
  		if (regex == null || regex.length() == 0 || name == null || name.length() == 0)
  			return false;
  		if ('*' == (regex.charAt(0))) {
  			return name.endsWith(regex.substring(1));
  		} else if (regex.endsWith("*")) {
  			return name.startsWith(regex.substring(0, regex.length() - 1));
  		} else {
  			int starPos = regex.indexOf('*');
  			if (-1 == starPos)
  				return regex.equals(name);
  			return name.startsWith(regex.substring(0, starPos)) && name.endsWith(regex.substring(starPos + 1));
  		}
  	}