1.正则表达时,贪婪模式,.*会一直匹配到最后一个

// 验证
let str = "123【空】345【空】789【空】0";
let res = str.replace(/(.*)【空】/,'$1测试');
console.log(res); // 123【空】345【空】789测试0

.

最新文章

  1. 苹果下如果安装nginx,给nginx安装markdown第三方插件
  2. URL 学习总结
  3. javascript url 相关函数(escape/encodeURL/encodeURIComponent区别)
  4. Redis必要的一些配置
  5. sql server查询时候注意的基本优化常识
  6. SharedPreferences的工具类,使用起来方便、快捷
  7. Visual Studio Code使用typings拓展自动补全功能
  8. Laravel Eloquent ORM
  9. Python中的循环与跳出
  10. 解析:type t_string is table of varchar2(32767) index by binary_integer
  11. (转)go rabbitmq实践
  12. golang http.client 遇到了 Connection reset by peer 问题
  13. Bootstrap -- 表格样式、表单布局
  14. hnsdfz -- 6.20 -- day5
  15. composer阿里云短信服务不支持传参为数值--为2017年短信接口,2018阿里云有更新http://www.cnblogs.com/q1104460935/p/8916096.html
  16. IE6浏览器的bug问题及相关解决的方法
  17. python之路——模块和包
  18. Hadoop视频教程汇总
  19. Logcat用法初探
  20. web操作文件的上传到服务器 并可下载 并且读取出来

热门文章

  1. ubuntu 自动获取ip
  2. C++反汇编-虚函数
  3. tomcat部署应用仅需ip和port访问
  4. 关于myBatis的问题There is no getter for property named 'USER_NAME' in 'class com.bky.model.实例类'
  5. WINDOWS 线程 纤程 进程
  6. MVC之Ajax如影随行
  7. java跨域解决
  8. andriod 错误:Only the original thread that created a view hierarchy can touch its views——Handler的使用
  9. Android读取Excel文件
  10. opencv编译Python接口