public static int getCharacterPosition(String string){
//這里是獲取"/"符號的位置
Matcher slashMatcher = Pattern.compile("/").matcher(string);
int mIdx = 0;
while(slashMatcher.find()) {
mIdx++;
//當"/"符號第三次出現的位置
if(mIdx == 3){
break;
}
}
return slashMatcher.start();
}
福建師范大學協和學院-本科-信息管理和信息系統-2011年6月畢業-4年工作經驗-女-26歲
for(String keyStr:keyword.split(":")){
Matcher slashMatcher = Pattern.compile("-").matcher(keyStr);
int mIdx = 0;
String[] keyArr=keyStr.split("-");
while(slashMatcher.find()) {
mIdx++;
//當"-"符號第四次出現的位置
if(mIdx == 4){
jobExe=keyArr[4];
}else if(mIdx == 5){
sex=keyArr[5];
}else if(mIdx == 6){
age=keyArr[6];
}
}
}