BeanShell 后置处理程序 提取记录
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);
}