116、骂战

作者:争斤论两花花帽 加入书签推荐本书

079

stringregex=“\\([\\d\\.\\+\\-\\*/]+\\)“;//提取括号表达式

080

string=string.replaceall(“\\s“,““);//去除空格

081

try{

082

patternpattern=patternpile(regex);

083

//循环计算所有括号里的表达式

084

while(pattern.matcher(string).find){

085

matcher=pattern.matcher(string);

086

while(matcher.find){

087

temp=matcher.group;

088

index=string.indexof(temp);

089

上一页 返回目录 下一页