我需要 {smile:smilename}
用 src 替换它的图像标签
<img src="/img/smile/smilename.gif">
我正在努力:
data['text'] = 'text{smile:smile3}text{smile:smile3}text{smile:smile3}text';
data['text'] = data['text'].replace('/{smile:(.*?)}/g', '<img src="/img/smile/$1.gif">');
但它不起作用