let str:string = '推广§新增意'
str = str.replace(/§/g,'')
console.log(str);
- 发布:2023-12-13 16:38
- 更新:2024-01-27 19:53
- 阅读:347
产品分类: HbuilderX
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win11
HBuilderX版本号: 3.98
HBuilderX安装路径: D:\\HBuilderX\\HBuilderX.exe
示例代码:
操作步骤:
let str:string = '推广§新增意'
str = str.replace(/§/g,'')
console.log(str);
let str:string = '推广§新增意'
str = str.replace(/§/g,'')
console.log(str);
预期结果:
let str:string = '推广§新增意'
str = str.replace(/§/g,'')
console.log(str);
let str:string = '推广§新增意'
str = str.replace(/§/g,'')
console.log(str);
实际结果:
let str:string = '推广§新增意'
str = str.replace(/§/g,'')
console.log(str);
let str:string = '推广§新增意'
str = str.replace(/§/g,'')
console.log(str);
bug描述:
uni-app x项目,uvue逻辑代码,替换分节符提示非法转义,尝试过逗号没问题
最佳回复