title: What the Error in my Regex to to check a string contains a-z or A-Z
body: <p>here is my code o check whether a string contain any other character than a-z OR A-Z.  </p>
  
  <pre><code>        Regex  pattern = new Regex("^[a-zA-Z]+$");
          if (pattern.IsMatch(txtCustName.Text))
          {
  
              MessageBox.Show("Name contains some Invalid Characters");
  
              txtCustName.Focus();
          }
  </code></pre>
  
  <p>It still showing error msg even I'm typing he correct string.</p>