public static void main(String[] args) {
// 生成 Pattern 对象并且编译一个简单的正则表达式"cat"
Pattern p = Pattern.compile("[0123456789]{1,}");
// 用 Pattern 类的 matcher() 方法生成一个 Matcher 对象
Matcher m = p.matcher("AE22+22");
StringBuffer sb = new StringBuffer();
while(m.find()){
m.appendReplacement(sb,"\\$1");
}
//将最后匹配到后面的子串添加到sb对象中
m.appendTail(sb);
System.out.println(sb);
}