I think you can accomplish what you want with Substring and Concat in a
Something along these lines:
a = load 'strings' as (line:chararray);
b = foreach a generate CONCAT(REPLACE(SUBSTRING(line, 0, 2), 'ab', 'mn',),
SUBSTRING(line, 2, SIZE(line)));
Of course you can use constant strings instead of replace if needed.
Disclaimer: I haven't tested the code, it is right off the top of my head.
On Fri, Apr 13, 2012 at 14:17, Shin Chan <[EMAIL PROTECTED]> wrote:
> Hi all,
> How to replace some value in string at particular location
> For example
> Replace values from index 0-1 with mn
> mncd as output
> Any built in UDF or i should write own UDF?.
> I checked existing Replace method , it replaces value to some another
> Thanks and Regards ,