相关疑难解决方法(0)

有String.Replace的方法只打了"整个单词"

我需要一种方法来做到这一点:

"test, and test but not testing.  But yes to test".Replace("test", "text")
Run Code Online (Sandbox Code Playgroud)

归还这个:

"text, and text but not testing.  But yes to text"
Run Code Online (Sandbox Code Playgroud)

基本上我想替换整个单词,但不是部分匹配.

注意:我将不得不使用VB(SSRS 2008代码),但C#是我的正常语言,因此两者中的响应都很好.

.net c# vb.net string

69
推荐指数
4
解决办法
6万
查看次数

标签 统计

.net ×1

c# ×1

string ×1

vb.net ×1