update solution for leetcode Regular Expression Matching