Imports System
Public Class FindAndReplaceAllOccurrencesOfASubstringInAString_VB_NET
Public Shared Sub Main(ByVal args As String())
Dim str As String = "java php go c python php phpphphp php rust"
Dim word As String = "php"
Dim replacewith As String = "VB"
str = str.Replace(word, replacewith)
Console.WriteLine(str)
End Sub
End Class
' run:
'
' java VB go c python VB VBVBhp VB rust
'