@Udf(description = "Returns first substring of the input that matches the given regex pattern")
  public String regexpExtract(
      @UdfParameter(description = "The regex pattern") final String pattern,
      @UdfParameter(description = "The input string to apply regex on") final String input
  ) {
    return regexpExtract(pattern, input, 0);
  }
@Test
  public void shouldReturnSubstringCapturedByGroupNumber() {
    assertEquals(udf.regexpExtract("(.*) (.*)", "test string", 1), "test");
    assertEquals(udf.regexpExtract("(.*) (.*)", "test string", 2), "string");
  }