You need to escape the backslashes, e.g. \\Q will be converted to \Q
by javac before it is passed to Pig.

On Tue, Jul 20, 2010 at 1:55 PM, Matthew Smith <[email protected]> wrote:
> All,
>
>
>
> I am using pig embedded in Java and need to use matches in my pig job.
> However when I try to use escape characters in the pig line, the
> compiler complains. How do I use complex regex while embedding?
>
>
>
> Sample code that is throwing errors:
>
>
>
> myServer.registerQuery("filtered = FILTER firstcut BY dIP matches
> '\Q34.21.12.*\E';");
>
>
>
> error: invalid escape sequence.
>
>
>
> Thanks,
>
>
>
> Matt
>
>

Reply via email to