replaceReg: function(str) {
    let regx = /(https|http|ftp|file):\/\/[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]/g;
    let chineseReg = /[\u4e00-\u9fa5]+/g;
    if (chineseReg.test(str)) { // 是包括汉字字母
      str = str.match(regx);
    }
    return str ? str.toString() : '';
  }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2019-05-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-04
  • 2022-12-23
  • 2021-11-28
相关资源
相似解决方案