title: Prevent user from inputing dollar sign ($)
body: <p>I would like to use regular expressions to prevent the dollar "$" symbol from being entered into the form. I have attempted regular expressions and can't seem to figure it out. Any assistance would be welcomed.</p>
  
  <pre><code>Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
      StripNonAlphabetCharacters(TextBox1)
  End Sub
  
          Public Sub StripNonAlphabetCharacters(ByVal input As TextBox)
          ' pattern matches any character that is NOT A-Z (allows upper and lower case alphabets)
      Dim rx As New Regex("[^a-zA-Z]")
      If (rx.IsMatch(input.Text)) Then
          Dim startPosition As Integer = input.SelectionStart - 1
          input.Text = rx.Replace(input.Text, "")
          input.SelectionStart = startPosition
      End If
  End Sub
  </code></pre>