Regular Expressions 101

Community Patterns

Finnish SSN

1

Regular Expression
PCRE (PHP <7.3)

/
\d{6}[-+A]\d{3}[\dA-Z]
/

Description

Finnish SSN are of form DDMMYYXNNNC where DDMMYY is date of birth, X is -, +, or A based on the century of birth, NNN is an order number (even for females and odd for males) and C is a checksum character.

Submitted by Hanzki - 8 years ago