When asking a user to enter a mobile number, we usually validate if a number has 10 digits or not. If not, we ask user to enter full mobile number. In this case, I've a TextBox control on an ASP.NET Form. The following regular expression in ASPX file validates the number.
.ASPX File
- <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br\>
- <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
- ControlToValidate="TextBox1" ErrorMessage="RegularExpressionValidator"
- ValidationExpression="[0-9]{10}"></asp:RegularExpressionValidator>
Here are couple of detailed tutorials in regular expressions with code examples:

Former memberPosted Jun 11, 2019, 6:31 AM
Thanks Sir...!
Vinay KeerthyPosted Mar 5, 2019, 7:28 AM
Thank u ....!
Aqeel EjazPosted Dec 19, 2017, 3:52 AM
Nice man..........!
pappu sharmaPosted Dec 6, 2016, 4:50 AM
Its col sir thanku very much
GokulPosted May 27, 2016, 5:14 AM
thank you so much
mak kPosted Nov 5, 2015, 10:58 AM
Thank You ..
Vivek JoyPosted Aug 27, 2015, 1:49 AM
Can u say what is the code in c#
Hari ShankerPosted Mar 18, 2015, 10:19 AM
Thanx
muhammed shanidPosted Feb 5, 2015, 11:07 PM
thank you