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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Panamanian Government ID (Cedula)
Expression
^(?<prov>10)(?<tipo>(AV))?-(?<tomo>\d{1,4})-(?<folio>\d{1,5})|^(?<prov>[1-9])(?<tipo>(AV))?-(?<tomo>\d{1,4})-(?<folio>\d{1,5})|^(?<tipo>(E|N|PE))-(?<tomo>\d{1,4})-(?<folio>\d{1,5})
Description
The Panamanian "cedula" is the equivalent of the USA's Social Security Number or the Dutch SOFI number. It is composed of three groups. The 2nd and 3rd groups are digits only. The first group typically has a number between 1-10 only. But in some cases it has N (naturalized) or E (foreigner) or PE (panamanian born abroad). And in some ocassions a number followed by AV meaning the person was born before the "cedula" system came into existence.. Shortcomings of this long regex are: a)any character beyond the 3rd group is not flagged as a non-match
Matches
PE-233-782, N-233-782, E-233-875, 10AV-4568-12234, 8AV-1234-78456, 4-233-782, 10-233-782
Non-Matches
8N-123-456
Author Rating: Not yet rated. Didimo Grimaldo
Source http://www.Coralys.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

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