if (repl.getType().isString()){
int start;
int end;
IBooleanResult lastPattern = e.getMatchPattern();
if (lastPattern == null) {
throw new ImplementationError("No last pattern known");
}
if (lastPattern instanceof RegExpPatternValue){
start = ((RegExpPatternValue)lastPattern).getStart();
end = ((RegExpPatternValue)lastPattern).getEnd();
}