Title |
Test
Find
Swedish Personal Nr (Personnummer)
|
Expression |
^\d{2}([0][1-9]|[1][0-2])([0][1-9]|[1-2][0-9]|[3][0-1])-\d{4}$ |
Description |
Simple regex for the Swedish personal number. It's in the form: YYMMDD-xxxx where xxxx is an arbitrary number from 0000-9999. |
Matches |
791231-1234 |
Non-Matches |
791332-1234 |
Author |
Rating:
Not yet rated.
Linus
|
Source |
|
Your Rating |
|
Title: Doesn't take into account that the last four characters can contain letters
Name: Thomas
Date: 8/25/2010 4:50:22 AM
Comment:
The last four digits/characters can actually contain non-numeric characters if the person is not a Swedish citizen, but still needs a person number because of studies in Sweden etc.
Example: 810514-T896