@Override
  public void beforeStart(UDFParameters udfParameters, UDTFConfigurations udtfConfigurations)
      throws Exception {
    regex = udfParameters.getString("regex");
    index = udfParameters.getIntOrDefault("index", -1);
    udtfConfigurations.setAccessStrategy(new MappableRowByRowAccessStrategy());
    if (index == -1) {
      udtfConfigurations.setOutputDataType(Type.INT32);
    } else {
      udtfConfigurations.setOutputDataType(Type.TEXT);
    }
  }
This function splits string from an input series according to given regex.
library-udf/src/main/java/org/apache/iotdb/library/string/UDTFRegexSplit.java