docs: static Pattern compileLogFileRegex(String baseName, String extension) {
          StringBuilder builder = new StringBuilder();
  
          // filename (dots escaped)
          builder.append(Pattern.quote(baseName));
  
          // _yy.MM.dd_HH.mm.ss
          builder.append("(_\\d\\d\\.\\d\\d\\.\\d\\d_\\d\\d\\.\\d\\d\\.\\d\\d)");
  
          // numeric identifier
          builder.append("(?:\\.(\\d+))");
  
          // extension (dots escaped)
          builder.append(Pattern.quote(extension));
  
          return Pattern.compile(builder.toString());
      }