截取字符串中的纯数字
|
||
public String getNumbers(String content) {
|
||
Pattern pattern = Pattern.compile("\\d+");
|
||
Matcher matcher = pattern.matcher(content); |
||
while (matcher.find()) {
|
||
return matcher.group(0);
|
||
} |
||
return "";
|
||
} |