var whatever = 'Some [b]random[/b] text in a [b]sentence.[/b]';
如何替换 [b]
的每个实例?与 <b>
和 [/b]
的每个实例与 </b>
在 jQuery 中?
我试图用正则表达式来做,但我无法让它正常运行。
最佳答案
关于javascript - 替换特殊字符的所有实例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11163328/