Imports System
Imports System.Text.RegularExpressions

Public Class Test
	Public Shared Sub Main()
		Dim strProhibitedWord As String = "fox"
		Dim strProhibitedWordEnclosed As String = "(?<!\p{L})(" & strProhibitedWord.Substring(0,1) & ")" & strProhibitedWord.Substring(1) & "(?!\p{L})"
		Dim strSentence1 As String = "The quick brown Fox jumped over the foxy sheep to see his fox friend."
		Dim optOptions1 As RegexOptions = RegexOptions.IgnoreCase
		Dim strResult As String = Regex.Replace(strSentence1, strProhibitedWordEnclosed, "$1**", optOptions1)
		
		Console.WriteLine(strResult)
	End Sub
End Class