Skip to content
Snippets Groups Projects
Unverified Commit 9888574d authored by Fredrik Forsmo's avatar Fredrik Forsmo Committed by GitHub
Browse files

Fix whitespace separator issue (#49)

parent 7f3dd069
No related branches found
Tags v3.0.4
No related merge requests found
......@@ -121,7 +121,7 @@ final class Personnummer implements PersonnummerInterface
private static function getParts(string $ssn): array
{
// phpcs:ignore
$reg = '/^(?\'century\'\d{2}){0,1}(?\'year\'\d{2})(?\'month\'\d{2})(?\'day\'\d{2})(?\'sep\'[\+\-\s]?)(?\'num\'(?!000)\d{3})(?\'check\'\d)$/';
$reg = '/^(?\'century\'\d{2}){0,1}(?\'year\'\d{2})(?\'month\'\d{2})(?\'day\'\d{2})(?\'sep\'[\+\-]?)(?\'num\'(?!000)\d{3})(?\'check\'\d)$/';
preg_match($reg, $ssn, $match);
if (empty($match)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment