例如字符串为'helloworld你好',想要获取到的内容是helloworld你好
var str = 'helloworld你好';
re = /\'(.*?)\'/;
str_new = str.replace(re,"$1");
console.log(str_new);
运行后结果如下:
例如字符串为'helloworld你好',想要获取到的内容是helloworld你好
var str = 'helloworld你好';
re = /\'(.*?)\'/;
str_new = str.replace(re,"$1");
console.log(str_new);
运行后结果如下:
相关文章: