Pattern p2 = Pattern.compile("^((\\+{0,1}0{0,2}86){0,1})");
Matcher m2 = p2.matcher(phoneNum);
StringBuffer sb = new StringBuffer();
while (m2.find())
{
m2.appendReplacement(sb, "");
}
m2.appendTail(sb);
return sb.toString();
用正则表达式替换手机号码前缀86
最新推荐文章于 2023-04-14 10:46:45 发布