title: How to put RegularExpressionValidator for phone number
body: <p>In asp.net, I want to use <code>regularexpressionvalidator</code> for phone number. requirement is only to allow numbers and Dash (-)</p>
  
  <pre><code>&lt;asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtPhone" ErrorMessage="Not a Valid Phone Number" ValidationExpression="\d*"&gt;
  </code></pre>
  
  <p>The above code only validates numbers but not Dash <code>-</code>. Like user randomly put
  23333-34 (should accept) or any combination. It is not must that - will be there. It can be numbers only some times.</p>