Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # user >> Documentation bug in REGEX_EXTRACT


+
Steve Bernstein 2013-10-08, 17:03
Copy link to this message
-
Re: Documentation bug in REGEX_EXTRACT
Well, usually for regexp, 0 match is the whole match and groups start from
1. Are you sure you are getting group (the thing in brackets) with 0?
8 жовт. 2013 13:04, користувач "Steve Bernstein" <[EMAIL PROTECTED]>
написав:

> Apologies if this is captured elsewhere.  In the Pig 0.11.1 documentation
> for the builtin function REGEX_EXTRACT (
> http://pig.apache.org/docs/r0.11.1/func.html#regex-extract), the third
> parameter is the index of the matched group to return.  The documentation
> says this is a "1-based parameter".  That's incorrect-it's zero-based.
>  E.g., to get the first match instance I used:
> REGEX_EXTRACT(string,'regex',0)
>
>
>
+
Steve Bernstein 2013-10-10, 17:00
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB