js正则匹配以$开头和结尾的内容,并改变颜色
let res = "$你好你好$" res = res.replace(/\$(?<=\$).*?(?=\$)\$/g, `<span onclick="((params)=>{ console.log(params) })('$&')" style="color: dodgerblue;padding: 0 5px;">$&</span>`)
let res = "$你好你好$" res = res.replace(/\$(?<=\$).*?(?=\$)\$/g, `<span onclick="((params)=>{ console.log(params) })('$&')" style="color: dodgerblue;padding: 0 5px;">$&</span>`)