View previous topic :: View next topic
|
Author |
Message |
Pavankumar.m Warnings : 1 New User
Joined: 28 Nov 2010 Posts: 53 Location: Mumbai
|
|
|
|
hi ,
can you please suggest me on how to replace particular character with new character, using sort
example :-
I need to replace 'where' with 'xxxxx'
------
input :-
where do you stay and where is are you from
output :-
xxxxx do you stay and xxxxx is are you from
--------
note :here 'where' can be present in any position |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Search the forum, lots of examples. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
What is the Sort product you are using?
Also please check if your sortproduct supports FINDREP or something similar |
|
Back to top |
|
|
Pavankumar.m Warnings : 1 New User
Joined: 28 Nov 2010 Posts: 53 Location: Mumbai
|
|
|
|
thank you ,, my problem solved using findrep |
|
Back to top |
|
|
Pavankumar.m Warnings : 1 New User
Joined: 28 Nov 2010 Posts: 53 Location: Mumbai
|
|
|
|
adding to previous querry,
here I got logic to replace one character with another.
how to replace these characters based on an indicator Present at position 1.
ex :
input:
2 where are you from and where do you stay
1 where are you from and where do you stay
2 where are you from and where do you stay
out put:
2 xxxxx are you from and xxxxx do you stay
1 yyyyy are you from and yyyyyy do you stay
2 xxxxx are you from and xxxxx do you stay
note :if 1 in first position then 'where' changed to
'yyyyy'
if 2 in first position then 'where' replaced with 'xxxxx'
thank you, |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Probably you need to use INREC IFTHEN with FINDREP as a combo |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Use IFTHEN=(WHEN=(logical expression to identify the case, the FINDREP subordinate to that. Again, many examples. |
|
Back to top |
|
|
Pavankumar.m Warnings : 1 New User
Joined: 28 Nov 2010 Posts: 53 Location: Mumbai
|
|
|
|
thank you, provided way worked well |
|
Back to top |
|
|
|