正则过滤textarea空格换行
ids.replace(/^\s+|\s+$/g,'').replace(/^(\r\n)+|(\r\n)+$/g,'').replace(/^(\r)+|(\r)+$/g,'').replace(/^(\n)+|(\n)+$/g,'').replace(/\r\n/g, '|').replace(/\n/g, '|').replace(/\r/g, '|').replace(/\s/g, '').replace(/\|{2,}/g, '|');10月312020

发表评论