Basically what you were doing before was searching for ., which in regex is "anything," and then replace it with a '', or nothing.
2011/2/22 Jonathan Coveney <[email protected]> > Following java regex, a . needs to be \\. The other two are fine. > > 2011/2/22 Sanjeev Shrivastava <[email protected]> > > Hi >> I am trying to use REPLACE function in PIG to clean the string in >> following way.. >> >> REPLACE(REPLACE(REPLACE('string','.',' '),'-',' '),' ',' ') >> >> So if string has got . or - or spaces , it removes it... >> >> However when I do it using PIG it makes the string as null and does not >> give me result(because of special character?) >> >> >> Any suggestions from brains out there? >> >> Thanks >> Sanjeev >> > >
