Regular Expression (Regex) for Alphabets with special characters only

Last Reply on Nov 10, 2014 03:36 AM By Azim

Posted on Nov 10, 2014 03:31 AM

 

hwwllo can any one explain me how to set regular expression for textbox that allows a to z,A to Z, special characters(,    .  #) ie comma dot and hash

Posted on Nov 10, 2014 03:36 AM Modified on on Nov 11, 2014 02:04 AM

Please refer this HTML code.

This will allow you Alphabets, Special Charecters (, . #)

<u>1. Using Regular Expression Validator</u>
<hr />
<asp:TextBox ID="TextBox1" runat="server" />
<br />
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBox1"
    ValidationExpression="[a-zA-Z.,#]*$" ErrorMessage="*Valid characters: Alphabets and Special Characters (.,#)." />
<br />
<asp:Button ID="Button1" Text="Validate" runat="server" />

 

I agree, here is the link: https://www.e-iceblue.com/Introduce/spire-office-for-net-free.html