Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all

Below is my sample input string

"Ajeet Tripath amplt;Ajeet.Tripathi@pb.comampgt;;CHetan Singh amplt;Chetan.singh@pb.comampgt;"


In this i want the output like below

Ajeet Tripath;CHetan Singh


Please let me know how to do this. here is in sample i gave 2 names which can be of 10-20 also in the original but the format will be same as given.

Please let me know on this

What I have tried:

I was trying something with replace but not able to figure it out

$member = "Ajeet Tripath amplt;Ajeet.Tripathi@pb.comampgt;;CHetan Singh amplt;Chetan.singh@pb.comampgt;"

$member -replace "amplt*" -replace " "
Posted
Updated 22-Aug-16 1:16am
Comments
[no name] 22-Aug-16 6:53am    
Hi Can you share your full code?
Black_Rose 22-Aug-16 6:55am    
I gave what i tried. $member is my input string. i tried replace but not able to get

1 solution

This question can't be answered because, you didn't say how to recognize what is a "keyword" and what is not.
Quote:
I was trying something with replace but not able to figure it out
This is not informative.

We have nothing to figure out what you try to do.
Use Improve question to update your question.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900