/** * @param {string} s * @param {string} p * @return {boolean} */ var isMatch = function(s, p) { let reg = RegExp('^'+p+'$'); return reg.test(s); };