class CustomFunction extends AbstractFunction {

    private AviatorEvaluatorInstance aviatorEval;

    public String replaceTargets(String exp, Map<String, Object> env) {<FILL_FUNCTION_BODY>}

    public AviatorEvaluatorInstance getAviatorEval() {
        return aviatorEval;
    }

    public void setAviatorEval(AviatorEvaluatorInstance aviatorEval) {
        this.aviatorEval = aviatorEval;
    }
}

        //Replace the first dot, because it can't be recognized by the 'reg' below.
        if (exp.startsWith( "r") || exp.startsWith( "p")) {
            exp = exp.replaceFirst("\\.","_");
        }
        //match example: "&&r.","||r."，"=r."
        String reg = "([| =)(&<>,+\\-*/!])((r|p)[0-9]*)\\.";
        exp = exp.replaceAll(reg,"$1$2_");
        return exp;
    
<no_super_class>