Use Regular Expressions(namespace System.Text.RegularExpressions):
Add the following Import:
Then use the following code:
Dim pattern As String = "[aeo]+[f]+"
Dim input As String = "thought thing though thefm through thus thorough this hellof apqaf efsdsds"
Dim replacement As String = "b"
Dim rgx As New Regex(pattern)
Dim result As String = rgx.Replace(input, replacement)