public void setRegexWithTime(String time) {
        String[] regexList = StringUtils.splitByWholeSeparatorPreserveAllTokens(originRegex,
                File.separator, 0);
        List<String> formattedList = new ArrayList<>();
        for (String regexStr : regexList) {
            if (regexStr.contains(YEAR) || regexStr.contains(YEAR_LOWERCASE)) {
                String tmpRegexStr = regexStr.replace(YEAR, time.substring(0, 4))
                        .replace(YEAR_LOWERCASE, time.substring(0, 4))
                        .replace(MONTH, time.substring(4, 6))
                        .replace(DAY, time.substring(6, 8))
                        .replace(DAY_LOWERCASE, time.substring(6, 8))
                        .replace(HOUR, time.substring(8, 10))
                        .replace(MINUTE, time.substring(10));
                formattedList.add(tmpRegexStr);
                formattedTime = time;
            } else {
                formattedList.add(regexStr);
            }
        }
        this.formattedRegex = StringUtils.join(formattedList, File.separatorChar);
        LOGGER.info("updated formatted regex is {}", this.formattedRegex);
    }
set regex with given time, replace the YYYYDDMM pattern with given time
inlong-agent/agent-plugins/src/main/java/org/apache/inlong/agent/plugin/filter/DateFormatRegex.java