现在我有一个字符串"*****order by ****"
order by 前字符串不确定,order by后的字符串也不确定,只有一个order by
现在我想把包括order by 在内的后面的所有字符都替换为其他字符串
请问怎么解决???????????????
大哥们~~~快帮帮小弟啊!!!!
str="*****order by ****"
dim s() as string=str.split("order by")
s(0)=otherstr
s(2)=anotherstr
Dim cmicStrOld As String = "select * From T1 order by Col1"
Dim cmicInt As Integer
cmicInt = cmicStrOld.IndexOf("order by")
Dim cmicStrNew As String
cmicStrNew = cmicStrOld.Substring(0, cmicInt) + "order by Col2"
MessageBox.Show(cmicStrNew)