結果 : javascript remove last character if match