Mikey3Strings Mikey3Strings - 1 month ago 10
Vb.net Question

Find / Replace within a String for Windows Forms and Visual Basic .NET -

I have an issue with finding a specific text within a string and then replacing it with " ", which is just a blank entry.

Dim ABCTEST As String
ABCTEST = previousJob.Comments.ToString() + currentJob.Comments.ToString()


So now my issue is to search the ABCTEST text and delete text such as "Tier Market" from it. Then pass it to a new string perhaps ABCTEST_NEW.

I know I might have to use a
for
loop to search out the keywords, but all the examples I have had a look at, are very broad.

Answer
ABCTEST_NEW = ABCTEST.Replace("Tier Market", " ")

String.Replace method

http://msdn.microsoft.com/en-us/library/fk49wtc1.aspx