日期:2014-05-18 浏览次数:20727 次
String strMoney ="48000万";
String regex ="[0-9_._,]+(.*?)";
Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(strMoney);
if(m.find()){
moneyText = m.group(0);
moneyLevel = m.group(1);
}
public static void main(String[] args) {
String strMoney ="48054354545400万";
String regex ="[0-9_._,]+(.*?)+[\u4e00-\u9fa5]";
Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(strMoney);
String moneyText="";
String moneyLevel="";
if(m.find()){
moneyText = m.group(0);
moneyLevel = m.group(1);