public String eval(String field, String regex, String replacement) {
        if (field != null) {
            return field.replaceFirst(regex, replacement);
        }
        return null;
    }
eval is String replacement execution method

@param field is the field to be replaced
@return replaced value
inlong-sort/sort-core/src/main/java/org/apache/inlong/sort/function/RegexpReplaceFirstFunction.java