結果 : check if input matches regex javascript