AltennyOntody
New Member
I'm looking for an function to replace a string in a string and only make it bold. I already got this function:\[code\]Function MakeBold(ByVal input As String, ByVal find As String) As String Return Regex.Replace(input, find, "<strong>" + find + "</strong>", RegexOptions.IgnoreCase)End Function\[/code\]This works but it removes the capital of a string. For example if i would run it with the string "Lorem ipsum dolor sit Dolor" and the replace part to be "dolor", it will return "Lorem ipsum dolor sit dolor". The second "dolor" loses it capital cause it's being replaced with one without a capital. How can i keep capitals in my string? So for example "DoLoR" will also still be that and not "dolor"