private void checkWildcard(String nsa, String lcp) {
        nsany = "*".equals(nsa);
        boolean wc = false;
        for (int i = 0; i < lcp.length(); i++) {
            char c = lcp.charAt(i);
            if (c == '?' || c == '*') {
                wc = true;
                break;
            }
        }
        if (wc) {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < lcp.length(); i++) {
                char c = lcp.charAt(i);
                switch (c) {
                case '.':
                    sb.append("\\.");
                    break;
                case '*':
                    sb.append(".*");
                    break;
                case '?':
                    sb.append('.');
                    break;
                default:
                    sb.append(c);
                    break;
                }
            }
            lcpattern = Pattern.compile(sb.toString());
        }
    }