Re: Re: Weird bug of REPLACE

2012-09-04 Thread Bill Graham
Opened a JIRA to better clarify the docs here: https://issues.apache.org/jira/browse/PIG-2905 On Tue, Sep 4, 2012 at 12:37 AM, MiaoMiao wrote: > Pity the document of REPLACE doesn't mention about regex at all. Thank > you so much for your reply, being able to know what's going on is such > a rel

Re: Re: Weird bug of REPLACE

2012-09-04 Thread MiaoMiao
Pity the document of REPLACE doesn't mention about regex at all. Thank you so much for your reply, being able to know what's going on is such a relief. Now I can trust myself with pig a little more. On Sat, 18 Aug 2012 at 00:05:29 AM, Cheolsoo Park wrote: > Hi, > If you look at the source code

Re: Weird bug of REPLACE

2012-08-17 Thread Cheolsoo Park
Hi, If you look at the source code of REPLACE, what it does is basically: String source = "[02/Aug/2012:05:01:17"; > String target ="["; > String replaceWith = ""; > return source.replaceAll(source, target, replaceWith); Note that Java String.replaceAll() takes a regular expression for the 2nd