@Override
  public void transform(Row row, PointCollector collector) throws Exception {
    String origin = row.getString(0);
    Matcher matcher = pattern.matcher(origin);
    String result = getResult(origin, matcher);
    collector.putString(row.getTime(), result);
  }
This function replaces substring according to regex parameter from an input series.
library-udf/src/main/java/org/apache/iotdb/library/string/UDTFRegexReplace.java