title: VB.Net REGEX to strip email
body: <p>I have a need to strip email addresses out of paragraphs of plain text. I have googled and search this site and found many suggestions - none of which I can get to work. I'm using code like this:</p>
  
  <pre><code>Imports System.Text.RegularExpressions
  
          Dim strEmailPattern As String = "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$"       
          Dim senText As String = "blah blah blah blah blah someone@somewhere.com"  
          Dim newText As String = String.Empty
  
          newText = Regex.Replace(senText, strEmailPattern, String.Empty)
  </code></pre>
  
  <p>After the call to Regex.Replace the newText string still contains the complete senText string including the email. I thought it was the regex pattern I was using but I have tried many so maybe I'm am missing something in the code?</p>