title: Regex is finding match but not counting if only matches once
body: <p>I've written a little piece of code where the user will write a word or sentence in a textbox, click a button and the text in a rich text box is searched, deleting the searched for text if found. That works. 
  What should also happen is that a message box will pop up saying "Phrase has been deleted X times." The issue I'm having is that this only works if it's found more than once. If it's found once, my programme seems to view it as being found 0 times. 
  The code is below, any help would be much appreciated -</p>
  
  <pre><code>Try
      Dim Selection As New Regex(TextBox1.Text)
      Dim deletion As New Regex("\n" &amp; Selection.ToString &amp; "\n")
  
      Dim Stripped As String = Regex.Replace(RichTextBox1.Text, deletion.ToString, vbCr, RegexOptions.Multiline)
      RichTextBox1.Clear()
      RichTextBox1.AppendText(Stripped)
  
      Dim matchcount = deletion.Matches(RichTextBox1.Text).Count
      If matchcount &gt; 0 Then
          MsgBox("'" &amp; Selection.ToString &amp; "'" &amp; " has been deleted " &amp; matchcount.ToString &amp; " times.")
      Else
          MsgBox("'" &amp; Selection.ToString &amp; "'" &amp; " has not been found on a line on its own.")
      End If
  </code></pre>