let res = "$你好你好$" res = res.replace(/\$(?<=\$).*?(?=\$)\$/g, `<span onclick="((params)=>{ console.log(params) })('$&')" style="color: dodgerblue;padding: 0 5px;">$&</span>`)
标签:结尾,res,js,正则,开头,你好 From: https://www.cnblogs.com/Man-Dream-Necessary/p/17508583.html