@karlenigma Yes i understood
once try like this
var specialchars = /["-.-/\"]/g;
if (specialchars.test(modelName)) {
var modelNamealt = modelName.replace(specialchars,'');
modelRec.setValue({fieldId: 'custrecord_model_alternative', value: modelNamealt});
}