ligang134 3 лет назад
Родитель
Сommit
476ccf39a3
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/main/java/com/ydtech/utils/IDCardUtils.java

+ 1 - 1
src/main/java/com/ydtech/utils/IDCardUtils.java

@@ -340,7 +340,7 @@ public class IDCardUtils {
      * @return
      * @return
      */
      */
     public static Map<String, String> addressResolution(String address) {
     public static Map<String, String> addressResolution(String address) {
-        String regex = "(?<province>[^省]+自治区|.*?省|.*?行政区|.*?市)(?<city>[^市]+自治州|.*?地区|.*?行政单位|.+盟|市辖区|.*?市|.*?县)(?<district>[^县]+县|.+区|.+市|.+旗|.+海域|.+岛)?(?<town>[^区]+区|.+镇)?(?<detail>.*)";
+        String regex = "(?<province>[^省]+自治区|.*?省|.*?行政区|.*?市)(?<city>[^市]+自治州|.*?地区|.*?行政单位|.+盟|市辖区|.*?市|.*?县)(?<district>[^县]+县|.*?区|.+市|.+旗|.+海域|.+岛)?(?<town>[^区]+区|.+镇)?(?<detail>.*)";
         Matcher m = Pattern.compile(regex).matcher(address);
         Matcher m = Pattern.compile(regex).matcher(address);
         String province = null, city = null, district = null, town = null, detail = null;
         String province = null, city = null, district = null, town = null, detail = null;
 //        List<Map<String, String>> table = new ArrayList<Map<String, String>>();
 //        List<Map<String, String>> table = new ArrayList<Map<String, String>>();