結果 : check if character matches regex javascript