//如string=“TAI-4564878”,中获取数字
public class getDataFromString {
public static String getData(String str) {
//String a=“love23next234csdn3423javaeye”;
String regEx="[^0-9]";
Pattern p = Pattern.compile(regEx);
Matcher m = p.matcher(str);
String result=m.replaceAll("").trim();
return result;
//System.out.println( m.replaceAll("").trim());
}
}