소스 검색

杭州第七:子女数量描写加入**子数**女数**正则

zhanghang 3 년 전
부모
커밋
d55601f9a8
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hangzhoudiqi/behospitalized/BEH0058.java

+ 6 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hangzhoudiqi/behospitalized/BEH0058.java

@@ -53,8 +53,13 @@ public class BEH0058 extends QCCatalogue {
             String regex = ".*[\\d一二三四五六七八九十]子[\\d一二三四五六七八九十]女.*";
             String regex1 = ".*[\\d一二三四五六七八九十][子|男].*";
             String regex2 = ".*[\\d一二三四五六七八九十]女.*";
+            String regex3 = ".*子数[\\d一二三四五六七八九十].*女数[\\d一二三四五六七八九十].*";
+            String regex4 = ".*女数[\\d一二三四五六七八九十].*子数[\\d一二三四五六七八九十].*";
+            String regex5 = ".*子数[\\d一二三四五六七八九十].*";
+            String regex6 = ".*女数[\\d一二三四五六七八九十].*";
             boolean flag=false;
-            if(maritalText.matches(regex1)||maritalText.matches(regex)||maritalText.matches(regex2)){
+            if(maritalText.matches(regex1)||maritalText.matches(regex)||maritalText.matches(regex2)||maritalText.matches(regex3)||maritalText.matches(regex4)
+                    ||maritalText.matches(regex5)||maritalText.matches(regex6)){
              flag=true;
             }
             regex = ".*\\d+-\\d+-\\d+-[1-9].*";