OUT.println(args[0]);
var re = new RegExp("id=(\\d+)","ig");
var arr = re.exec(args[0]);
if(!RegExp.$1 || RegExp.$1 != args[1]){
AssertionResult.setFailure(true);
AssertionResult.setFailureMessage(RegExp.$1 + "<>" + args[1]);
}
var re = new RegExp("id=(\\d+)","ig");
var arr = re.exec(args[0]);
if(!RegExp.$1 || RegExp.$1 != args[1]){
AssertionResult.setFailure(true);
AssertionResult.setFailureMessage(RegExp.$1 + "<>" + args[1]);
}
2016-03-07
java.util.regex.Pattern p = java.util.regex.Pattern.compile("id=(\\d+)");
java.util.regex.Matcher m = p.matcher(bsh.args[0]);
boolean found = m.find();
if(found){
if(!m.group(1).equals(bsh.args[1])){
Failure=true;
FailureMessage = m.group(1) + "!=" + bsh.args[1];
}
}
else
Failure=true;
java.util.regex.Matcher m = p.matcher(bsh.args[0]);
boolean found = m.find();
if(found){
if(!m.group(1).equals(bsh.args[1])){
Failure=true;
FailureMessage = m.group(1) + "!=" + bsh.args[1];
}
}
else
Failure=true;
2016-03-07