title: Regular expression to allow only one special character?
body: <p>I am trying to add validation for names that allow apostrophe, dash and period only once in   the input. </p>
  
  <p>I tried using the below expression:</p>
  
  <pre><code>name= /^[a-zA-Z-,]+(\-\.\'\s{0,1}[a-zA-Z-, ])*$/
  </code></pre>
  
  <p>But the values are accepting only one character after the alphabets.<br>
  How to specify the characters to allow only once in the regular expression.<br>
  What is the mistake in my expression?</p>
  
  <p>EDIT: </p>
  
  <pre><code>^[-'.a-zA-Z0-9][a-zA-ZÀ-ÿ\-\.\'\s|]{0,25}$
  </code></pre>
  
  <p>But this allows the special characters to allow multiple times.</p>