public String evaluate(String s, String regex) {
    return this.evaluate(s, regex, 1);
  }
UDF to extract a specific group identified by a java regex. Note that if a
regexp has a backslash ('\'), then need to specify '\\' For example,
regexp_extract('100-200', '(\\d+)-(\\d+)', 1) will return '100'
ql/src/java/org/apache/hadoop/hive/ql/udf/UDFRegExpExtract.java