Page 1 of 1

Ereplace doubt

Posted: Mon Aug 23, 2010 1:54 pm
by chrisjones
Hi ,

I want to replace multiple words with space like Dr or MD or Mrs or Ms in the string with space ..I think using ereplace we can replace one at a time but I want to replace multiple words with space..please suggest.

Posted: Mon Aug 23, 2010 2:21 pm
by vinothkumar
You have to use ereplace multiple times.

Ereplace doubt

Posted: Mon Aug 23, 2010 2:34 pm
by chrisjones
Thanks for your reply.

you mean to say I need to use that many stage varaible like below or is there any other tehchique

sv1=ereplace(sv, "Dr", "")
sv2=ereplace(sv, "Md", "")
sv3=erepace(sv,"Ms","")

And also ereplace is not working in 8.0 parallel stage i used the below syntax.

ereplace(sv, "Dr", "")

Posted: Mon Aug 23, 2010 2:37 pm
by anbu
ereplace function is not avialable in Parallel jobs. Search for ereplace c++ function in the forum

Posted: Mon Aug 23, 2010 2:40 pm
by arunkumarmm
Or you can use a basic tranformer to use ereplace.

Posted: Mon Aug 23, 2010 2:42 pm
by vinothkumar
It should be coming like this.

sv1=ereplace(sv, "Dr", "")
sv2=ereplace(sv1, "Md", "")
sv3=erepace(sv2,"Ms","")

As anbu said, you can find the equivalent of ereplace function for parallel edition, in one of the posts given by DSGuru.