Y
Yogi
Hi Guys,
I have a variable say:
$x = "this is test program with test inputs";
My requirement is to replace nth occurrance of "test" with something
else. how to achieve the same using perl regex. if i do something
like:
$x =~ s/test/java/g;
This is going to replace all occurrance of test with "java" but my
requirement is to replace say 2nd occurrance only. Any help?
Regards.
I have a variable say:
$x = "this is test program with test inputs";
My requirement is to replace nth occurrance of "test" with something
else. how to achieve the same using perl regex. if i do something
like:
$x =~ s/test/java/g;
This is going to replace all occurrance of test with "java" but my
requirement is to replace say 2nd occurrance only. Any help?
Regards.