new CheckResult(this, false, fieldName, value,
String.format("Regular expression: '%1$s'", regexp)));
}
// Populate variable scope with matched parts
MatchResult res = m.toMatchResult();
int groupCount = res.groupCount();
for (int i = 0; i <= groupCount; ++i) {
variables.setVariable(Integer.toString(i), res.group(i));
}
variables.setVariable("groupCount", Integer.toString(groupCount));