splitGetVal(smsContent,null,"【","】");
splitGetVal(smsContent,"联系人:",null,",");
private String splitGetVal(String org,String keyName,String separatorStart,String separatorEnd){
if(StringUtil.isNotEmpty(org)){
if(StringUtil.isNotEmpty( keyName)){
String[] tmp = org.split(keyName);
if(tmp.length>1){
int indexOfEnd = tmp[1].indexOf(separatorEnd);
if(indexOfEnd<=0) indexOfEnd = tmp[1].length()-1;
int indexOfStart=StringUtil.isNotEmpty(separatorStart)?tmp[1].indexOf(separatorStart)+1:0;
return tmp[1].substring(indexOfStart,indexOfEnd);
}
}else {
int indexS = org.indexOf(separatorStart)+1;
int indexE = org.indexOf(separatorEnd);
return org.substring(indexS,indexE);
}
}
return "";
}