Skip to content

Commit

Permalink
f - Legger til vaske av string der det er 11 siffer til Fodelsenummer
Browse files Browse the repository at this point in the history
  • Loading branch information
dskarpas committed Nov 15, 2023
1 parent 6197628 commit 3484706
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ class Fodselsnummer private constructor(@JsonValue val value: String) {
}
}

fun vask11sifre(tekst: String) = tekst.replace(Regex("""\b\d{11}\b"""), "***")
fun fraMedValidation(fnr: String?): Fodselsnummer? {
return try {
Fodselsnummer(fnr!!.replace(Regex("[^0-9]"), ""))
Expand Down

0 comments on commit 3484706

Please sign in to comment.