@Override
  public void transform(Row row, PointCollector collector) throws Exception {
    Matcher matcher = pattern.matcher(row.getString(0));
    if (matcher.find() && matcher.groupCount() >= group) {
      collector.putString(row.getTime(), matcher.group(group));
    }
  }
This function matches substring according to given regex from an input series.
library-udf/src/main/java/org/apache/iotdb/library/string/UDTFRegexMatch.java