Hi, I'm trying to find certain words from a textbox and replace them with blank space, this is what I have at the moment: TextBox1.Text = TextBox1.Text.Replace(ReplaceString1, "")
TextBox1.Text = TextBox1.Text.Replace(ReplaceString2, "")
TextBox1.Text = TextBox1.Text.Replace(ReplaceString3, "")
The problem is, it is letters of the strings aswell, for example if the ReplaceString1's contents was 'it', then after the replace a word such as hit would read 'h'. Is there any way to stop this happening, and replace these strings ONLY if they are surrounded by white space?
TextBox1.Text = TextBox1.Text.Replace(ReplaceString2, "")
TextBox1.Text = TextBox1.Text.Replace(ReplaceString3, "")
The problem is, it is letters of the strings aswell, for example if the ReplaceString1's contents was 'it', then after the replace a word such as hit would read 'h'. Is there any way to stop this happening, and replace these strings ONLY if they are surrounded by white space?
Last edited: