|   | ||
|     public String getNumbers(String content) { | ||
|     Pattern pattern = Pattern.compile("\\d+"); | ||
| Matcher matcher = pattern.matcher(content); | ||
|     while (matcher.find()) { | ||
|         return matcher.group(0); | ||
| } | ||
|         return ""; | ||
| } | 
原文:http://www.cnblogs.com/wmcjda/p/5898196.html