From 6f8ae632a9a61263397e5b1e9d464b109e7fed47 Mon Sep 17 00:00:00 2001 From: Johannes Date: Thu, 28 Oct 2021 11:42:02 +0200 Subject: [PATCH] hotfix: Changed regexp to not accept | as separator. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Tegnér --- src/main/kotlin/Personnummer.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/Personnummer.kt b/src/main/kotlin/Personnummer.kt index c3029fd..9946cda 100644 --- a/src/main/kotlin/Personnummer.kt +++ b/src/main/kotlin/Personnummer.kt @@ -12,7 +12,7 @@ import java.time.format.DateTimeParseException class Personnummer { companion object { - val PNR_REGEX = "^(\\d{2})?(\\d{2})(\\d{2})(\\d{2})([-|+]?)?((?!000)\\d{3})(\\d?)$".toRegex() + val PNR_REGEX = "^(\\d{2})?(\\d{2})(\\d{2})(\\d{2})([-+]?)?((?!000)\\d{3})(\\d?)$".toRegex() val ASCII_REDUCE = 48 /**