删除关键字之间的文字 [英] Remove text between keywords
问题描述
大家好
以下是我的示例输入字符串
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
请告诉我怎么做。这里是样品我给了2个名字,也可以是原来的10-20,但格式与给定的相同。
请告诉我这个
我尝试了什么:
我正在尝试更换但无法弄明白
$ member =Ajeet Tripath amplt; Ajeet.Tripathi@pb.comampgt ;; CHetan Singh amplt; Chetan.singh@pb。 comampgt;
$ member -replaceamplt *-replace
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 " "
推荐答案
member = Ajeet Tripath amplt; Ajeet.Tripathi@pb.comampgt ;; CHetan Singh amplt; Chetan.singh@pb.comampgt;
member = "Ajeet Tripath amplt;Ajeet.Tripathi@pb.comampgt;;CHetan Singh amplt;Chetan.singh@pb.comampgt;"
member -replaceamplt *-replace
member -replace "amplt*" -replace " "
这个问题无法解答,因为你没有说明如何识别什么是关键字,什么不是。
This question can't be answered because, you didn't say how to recognize what is a "keyword" and what is not.
我正在尝试使用替换,但无法想象我t out
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.
这篇关于删除关键字之间的文字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!