import java.util.regex.Matcher;
import java.util.regex.Pattern;
String responseData = prev.getResponseDataAsString();
Pattern pattern = Pattern.compile("砖石数\\[([0-9]+)\\]");
Matcher matcher = pattern.matcher(responseData);
if (matcher.find()) {
String diamonds = matcher.group(1);
vars.put("diamonds", diamonds);
}
标签:regex,java,String,后置,Pattern,matcher,处理程序,BeanShell,diamonds From: https://www.cnblogs.com/cpas-3-org/p/17516678.html