main
黄海 2 years ago
parent 9c6ef691b9
commit 5002b83ba0

@ -131,6 +131,7 @@ public class TestRegex {
e.printStackTrace();
}
}
/**
*
*
@ -145,6 +146,7 @@ public class TestRegex {
return false;
}
}
public static boolean leftMatch(String str) {
int ls = str.indexOf("(");
int rs = str.indexOf(")");
@ -216,7 +218,19 @@ public class TestRegex {
Matcher matcher = pattern.matcher(str);
if (matcher.find()) {
flag = true;
record.set("zhuanye", matcher.group(1));
String zhuanye = matcher.group(1);
String xz = "";
int xzStart = zhuanye.indexOf("(学制");
if (xzStart >= 0) {
int xzStop = xzStart;
while (xzStop < zhuanye.length() && String.valueOf(zhuanye.charAt(xzStop)) != ")") {
xzStop++;
}
xz = zhuanye.substring(xzStart, xzStop);
zhuanye = zhuanye.replace(xz, "");
}
record.set("zhuanye", zhuanye);
String xf = matcher.group(2);
xf = xf.replace("r", "");
if (isStr2Num(xf.toString())) {
@ -224,7 +238,7 @@ public class TestRegex {
if (matcher.groupCount() >= 3) {
String memo = matcher.group(3);
memo = changeMemo(memo);
record.set("memo", memo);
record.set("memo", memo + xz);
}
} else {
record.set("xf", "学费待定");
@ -235,7 +249,7 @@ public class TestRegex {
//姜莹莹需求
memo.replace("(", "");
memo.replace(")", "");
record.set("memo", memo);
record.set("memo", memo + xz);
}
}
break;

Loading…
Cancel
Save