Displaying page
of
pages;
Items to
Title |
Test
Details
Swedish personnummer with accepted foreigners
|
Expression |
^[0-9]{6}-[0-9pPtTfF][0-9]{3}$
|
Description |
Other Swedish personnummer regexps do not take into account that at Swedish universities, foreigners might get special temporary personnummers with a "P", "T", or "F" instead of the first of the four last numbers.
This code fixes the problem, but does not check the validity of the date, or the last number.
|
Matches |
123456-1234 | 123456-P234 | 123456-f234
|
Non-Matches |
123456-12 | 1234561234 | 123456
|
Author |
Rating:
Not yet rated.
Petter Terenius
|
Displaying page
of
pages;
Items to