Pattern和Matcher中表达式
//使用正则表达式
//Pattern pattern = Pattern.compile("[^\u4E00-\u9FA5]");//[\u4E00-\u9FA5]是unicode2的中文区间
Pattern pattern = Pattern.compile("用户");
Matcher matcher = pattern.matcher("用户15454");
String str = "搬运工"+"-"+matcher.replaceAll("");
System.out.println(str);
本人开发小白,所写随笔有转发、有心得、随笔、所见问题、或者感觉不错的东西,希望能帮助他人,同时也相当给自己方便!(未来及标明出处,望原作者以及读者见谅海涵!一切为了能解决问题。。。。)