I'm trying to find a solution for the following task, but I’m stuck. Please for a solution.
The code is working fine for counting exact string matches, but what I’m trying to achieve is to find and count words if they are not the same using regex pattern or like operator and wildcard combined, any solution acceptable for example:

Add.ress

add/ress

add-ress

add ress

add\*ress

add!ress

add\ress

etc.

Count=6

Only if input textbox.text is "add?ress" count should be 6 (“add ress” excluded because of space ), to make it clear input can be any word but if ? is in between then this rule should apply.
the question mark (?) can by anything except Letters and numbers
else if textbox.text is “add ress” count=1 or if textbox.text is add-ress count=1.
I would like to use ? for any char in between string if it appears on search textbox.

Thank you.

```
Private Sub btnAddTerm_Click(sender As Object, e As EventArgs) Handles btnAddTerm.Click

    Dim foundAt As Integer = RichTextBox1.Find(txbSearch_Term.Text, 0, RichTextBoxFinds.WholeWord)
    Dim text2 As String = RichTextBox1.Text.ToString.ToLowerInvariant

    Dim txbsearch As String = txbSearch_Term.Text

    'Regex.Match(txbsearch, "[-]{1,2}:[/]{2}:[?]{2}")
    'Regex.Match(text2, "^.*?\\b([^a-zA-Z\\s].?[sa-zA-Z])\\b.*$", RegexOptions.None)

    txbSearch_Term.CharacterCasing = CharacterCasing.Lower

    Dim count As Integer = 0

    Do While foundAt > -1

        'count += Regex.Matches(text2, txbsearch.ToString()).Count
        'Regex.Match(txbsearch, "^.*?\\b([^a-zA-Z\\s].?[sa-zA-Z])\\b.*$")
        Dim pattern As String = "^.*?\b([^a-zA-Z\s].?[sa-zA-Z])\b.*$"
        RichTextBox1.SelectAll()
        'Dim input As String = txbsearch

        count += 1

            RichTextBox1.Select(foundAt, txbsearch.Length)
            RichTextBox1.SelectionBackColor = Color.Yellow

            foundAt = RichTextBox1.Find(pattern, foundAt + txbsearch.Length, RichTextBoxFinds.WholeWord)

    Loop

    Dim rowId As Integer = dgvTermCount.Rows.Add()
    Dim row As DataGridViewRow = dgvTermCount.Rows(rowId)
    row.Cells("Column1").Value = txbsearch
    row.Cells("Column2").Value = count

End Sub

```