@@ -0,0 +1,919 @@
+package leetcode.regular_expression_matching;%0A%0Apublic class Solution %7B%0A%09public boolean doMatch(char%5B%5D s, char%5B%5D p, int s_cur, int s_to, int p_cur, int p_to)%7B%0A%09%09if(s_cur == s_to && p_cur == p_to) return true;%0A%09%09if(s_cur %3C s_to && p_cur == p_to) return false;%0A%09%09if(p_cur + 1 %3E= p_to %7C%7C p%5Bp_cur + 1%5D != '*')%7B%0A%09%09%09if(s_cur == s_to %7C%7C (s%5Bs_cur%5D != p%5Bp_cur%5D && p%5Bp_cur%5D != '.'))%7B%0A%09%09%09%09return false;%0A%09%09%09%7Delse%7B%0A%09%09%09%09return doMatch(s, p, s_cur + 1, s_to, p_cur + 1, p_to);%0A%09%09%09%7D%0A%09%09%7Delse%7B%0A%09%09%09if(s_cur %3C s_to)%7B%0A%09%09%09%09if(p%5Bp_cur%5D == s%5Bs_cur%5D %7C%7C p%5Bp_cur%5D == '.')%7B%0A%09%09%09%09%09if(doMatch(s, p, s_cur + 1, s_to, p_cur, p_to)) return true;%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%09return doMatch(s, p, s_cur, s_to, p_cur + 2, p_to);%0A%09%09%7D%0A%09%7D%0A%0A%09public boolean isMatch(String s, String p) %7B%0A%09%09return doMatch(s.toCharArray(), p.toCharArray(), 0, s.length(), 0, p.length());%0A%09%7D%0A%0A%09public static void main(String%5B%5D args)%7B%0A%09%09System.err.println(new Solution().isMatch(%22%22, %22.*%22));%0A%09%7D%0A%7D%0A

Add java solution for 10. Regular Expression Matching