I checked my regular expression in "rubular" and passed all of my prerequisites. But when I use this in the asp text box, it is not passed true.
My code looks below
<asp:TextBox ID="MobileNumber" runat="server"></asp:TextBox> <asp:RegularExpressionValidator ID="MobileNumberValidater" runat="server" ControlToValidate="MobileNumber" ErrorMessage="Please enter valid Numbers"></asp:RegularExpressionValidator>
My regex looks below
^ ((0 (\ = \ d * \ d * #) [\ d] {, 11}) (# \ d {, 5})?) | (0 (?: \ D {, 10}) (# \ d {, 5})?) | (0 ((? = \ D * \ d * $) [\ d] {, 11}))) $
I am trying to check the following lines:
1) .012345 6789 # 123
2) .025698 785 # 6548
Thanks.
source share