JavaScript:去掉字符串指定首尾字符2022-02-28 本文已影响0人 东方晓 2022-02-28 周一 例如去掉首尾引号 let str= str.replace(/^(\s|")+|(\s|")+$/g, '');