// var address = "辽宁省沈阳市和平区"; // 以这个地址为例

      // const address = msg.detail;

      // const proExp = ".+[省]",cityExp = ".+[市]",disExp = ".+[区]";

      // const province = address.match(new RegExp(proExp)); // 省

      // const city = address.match(new RegExp(cityExp))[0].replace(province, ""); // 市

      // const district = address.match(new RegExp(disExp))[0].replace(province, "").replace(city, ""); // 区

 

相关文章:

  • 2021-10-17
  • 2021-12-18
  • 2021-11-09
  • 2021-05-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-13
  • 2021-08-21
猜你喜欢
  • 2022-12-23
  • 2021-12-18
  • 2021-10-03
  • 2022-12-23
  • 2021-07-25
相关资源
相似解决方案