本文介绍了用扭曲替换C#.net中的String的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨我想从字符串中删除单词-这是一个示例
String ="a男孩有一个名为a"的魔术棒"
结果=一个男孩有个魔杖,名字叫""
在上面的示例中,字母``a''不在单词中时被删除(即后跟非空白或以非空白开头或在句子开头或句子结尾处)
有快速的方法吗?
谢谢.
EK
HiI want to remove words form a string - Here is an example
String="a boy has a magic wand named a a"
Result="a boy has magic wand named a"
in the above example, the letter ''a'' was removed when it is not part of a word(i.e. followed by non-blank or preceded by non-blank or at sentence beginning or at sentence end)
is there a quick way to do this?
Thanks.
EK
推荐答案
这篇关于用扭曲替换C#.net中的String的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!