public boolean isMatch(String s, String p) {
        if (s.length() == 0) {
            return isEmptyOrStar(p);
        }
        if (p.length() == 0) {
            return false;
        }
        char s1 = s.charAt(0);
        char p1 = p.charAt(0), p2 = '0';
        if (p.length() > 1) {
            p2 = p.charAt(1);
        }
        if ('*' == p2) {
            if (s1 == p1 || p1 == '.') {
                return isMatch(s, p.substring(2)) || isMatch(s.substring(1), p);
            } else {
                return isMatch(s, p.substring(2));
            }
        } else {
            if (s1 == p1 || p1 == '.') {
                return isMatch(s.substring(1), p.substring(1));
            }
            return false;
        }


    }