Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # user >> Find function with regexp


Copy link to this message
-
Re: Find function with regexp
Jakub -- The MATCHES operator accepts regexes as input.  You can add a NOT
to invert the logic.

http://pig.apache.org/docs/r0.7.0/piglatin_ref2.html

Norbert

On Mon, Jun 18, 2012 at 7:14 AM, Jakub Glapa <[EMAIL PROTECTED]> wrote:

> Hi all,
> I found in pig latin a 'matches' operator for pattern matching.
> I didn't find it in documentation but maybe there exists something similar
> but for searching?
> Basically in java world I would want to get the result of the
> Matcher.find() method not Matcher.matches().
> Will I have to end up writing my own UDF for that?
>
> Thanks for help.
>
> PS.
> I'm trying to filter out strings with consecutive repeated characters. I've
> constructed a regexp that detects them.
> Now I just have to apply it somehow.
>
>
> --
> regards,
> Jakub Glapa
>