Title |
Test
Find
Pattern Title
|
Expression |
^[A-Za-z]{6}[0-9LMNPQRSTUV]{2}[A-Za-z]{1}[0-9LMNPQRSTUV]{2}[A-Za-z]{1}[0-9LMNPQRSTUV]{3}[A
-Za-z]{1}$ |
Description |
Check italian fiscal code (codice fiscale) with "OMOCODIA" control |
Matches |
BTTNDR78R06A79QU |
Non-Matches |
BTTNDR78R06A79AU |
Author |
Rating:
andrea mele
|
Source |
|
Your Rating |
|
Title: shorten things a bit
Name: zeuz
Date: 6/2/2010 4:46:50 PM
Comment:
Using lorenzos improvements and shortening a bit we get the following:
[A-Z]{6}[0-9L-NP-V]{2}[A-EHLMPR-T][0-9L-NP-V]{2}[A-Z][0-9L-NP-V]{3}[A-Z]
Regards,
Norbert
Title: Improvements
Name: lorenzo
Date: 10/11/2006 6:15:30 AM
Comment:
1) Why including lowercase [A-Za-z] when you imply uppercase in [0-9LMNPQRSTUV]? Better to make the whole regexp case insensitive
2) 9th character is a letter representing the month of birth, so it is limited to [AEPBHRCLSDMT], not [A-Z]