final public static String simpleWildMatch(String mask, String test)
{
 if(mask==null) return test;
 int i=mask.indexOf('*',0);
 if(i==-1) {
            if(test.equals(mask)) 
            	return test;
            else
            	return null;
 }
 int tl=test.length();
 int ml=mask.length();
 if(i!=ml-1) throw new IllegalArgumentException("* is not at end of string "+mask);

 if(test.regionMatches(0,mask,0,ml-1))

  if (tl>=ml) 
	  return test.substring(ml-1);
  else
	  return "";

 return null;
}