StringBuffer inquiryString = new StringBuffer(inquiryID); if (inquiryString.length() > patchString.length()) return false; for (int j = 0; j < inquiryString.length(); j++) if (inquiryString.charAt(j) == '*') inquiryString.setCharAt(j, patchString.charAt(j)); return (inquiryString.toString().equalsIgnoreCase(patchString.toString().substring(0, inquiryString.length())));
Pattern p = Pattern.compile(inquiryID,Pattern.CASE_INSENSITIVE); return p.matcher(patchString).lookingAt();
    private boolean checkInquiry(StringBuffer patchString, String inquiryID) {	StringBuffer inquiryString = new StringBuffer(inquiryID);	if (inquiryString.length() > patchString.length())	    return false;	for (int j = 0; j < inquiryString.length(); j++)	    if (inquiryString.charAt(j) == '*')		inquiryString.setCharAt(j, patchString.charAt(j));	return (inquiryString.toString().equalsIgnoreCase(patchString.toString().substring(0, inquiryString.length())));    }