我在论坛上尝试搜索,但找不到与我所需完全相似的内容。我基本上想要从我所收到的结果中删除#
符号,以下是正则表达式的虚拟示例。
let postText = 'this is a #test of #hashtags';
var regexp = new RegExp('#([^\\s])', 'g');
postText = postText.replace(regexp, '');
console.log(postText);
this is a est of ashtags
我需要改变什么才能只删除标签而不切断每个单词的第一个字母?