2018年8月27日

replace的坑

摘要: 问题:html中代码段包含了$,在使用replace替换时,$直接被替换了解决:先把文本中的$全部替换成自己定义的标签,最后在还原回去原因:在介绍replace的文档中,$&代表插入匹配的子串 example:let code = `<pre><code>private String ge(Stri 阅读全文

posted @ 2018-08-27 16:58 daV_chen 阅读(162) 评论(0) 推荐(0)

导航