RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pakistan CNIC Validation
Expression
^[0-9+]{5}-[0-9+]{7}-[0-9]{1}$
Description
This validation is for Pakistan New CNIC.
Matches
12345-1234567-1
Non-Matches
1234512345671
Author Rating: Not yet rated. Asif Iqbal
Source http://www.webwizo.com
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Problem dealing it in ASP.NET MVC
Name: Nabeel - https://relliks.com
Date: 4/5/2020 12:44:42 PM
Comment:
Its working fine


Title: Need to improvement
Name: Usman Shabbir
Date: 8/24/2019 1:07:36 PM
Comment:
Working fine but skip the one scenario, when we put one dash and skip another dash. it's accepted, but should not accepted this. e.g(11111-11111111). It should allow with both dashes or without both.


Title: Need to improvement
Name: Usman Shabbir
Date: 8/24/2019 1:04:36 PM
Comment:
Working fine but skip the one scenario, when we put one dash and skip another dash. it's accepted, but should not accepted this. e.g(11111-11111111). It should allow with both dashes or without both.


Title: Not Work
Name: Muhammad ILyas
Date: 5/14/2019 9:00:28 AM
Comment:
I Use maskedtextbox with dashes it length reached to 15, but this not work for me


Title: Not Work
Name: Muhammad ILyas
Date: 5/14/2019 9:00:15 AM
Comment:
I Use maskedtextbox with dashes it length reached to 15, but this not work for me


Title: Match exactly 13 integers with or without "-"
Name: Muhammad Usman
Date: 10/27/2018 1:17:32 PM
Comment:
Well, I managed to validate with both scenarios (with and without dashed "-", exactly 13 integers) by '/^[0-9+]{5}-?[0-9+]{7}-?[0-9]{1}$/' Thanks


Title: Match exactly 13 integers without "-"
Name: Muhammad Usman
Date: 10/27/2018 12:49:26 PM
Comment:
What if a need to validate in both ways with or without dashes "-"? Kindly guide me.


Title: Nice Work
Name: shireen
Date: 3/9/2017 11:27:36 AM
Comment:
Thanks


Title: Thankyou
Name: Malik Muzamil
Date: 5/22/2016 5:14:38 AM
Comment:
Thankyou very much i had to integrate the data format for CNIC in MVC, Entity FrameWork, C#, Visual Studio so i did it in Data Annotation [RegularExpression("^[0-9+]{5}-[0-9+]{7}-[0-9]{1}$")] public string employeeCnic { get; set; }


Title: Thankyou
Name: Malik Muzamil
Date: 5/21/2016 6:02:17 PM
Comment:
Thankyou very much i had to integrate the data format for CNIC in MVC, Entity FrameWork, C#, Visual Studio so i did it in Data Annotation [RegularExpression("^[0-9+]{5}-[0-9+]{7}-[0-9]{1}$")] public string employeeCnic { get; set; }


Title: Thanks!
Name: Beeba Munda
Date: 7/24/2015 3:02:35 PM
Comment:
Awesome work! thanks!


Title: Thanks!
Name: Beeba Munda
Date: 7/24/2015 2:59:37 PM
Comment:
Awesome work! thanks!


Title: like
Name: zain
Date: 3/29/2015 4:28:24 AM
Comment:
very good


Title: Thanks
Name: Shukerullah
Date: 11/12/2014 6:47:32 AM
Comment:
Thank you, it worked


Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials