Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View file

@ -0,0 +1,26 @@
function verifIBAN ([string]$ibanS)
{
if ($ibanS.Length -ne 27) {return $false} else
{
$ibanI="$($ibanS.Substring(4,23))$($ibanS.Substring(0,4))".ToUpper()
[int]$comptIBAN=0
$NumIBAN=""
while ($comptIBAN -lt 27)
{
if ([byte]$ibanI[$comptIBAN] -ge 65 -and [byte]$ibanI[$comptIBAN] -le 90)
{
$NumIban+=([byte]$ibanI[$comptIBAN]-55)
} #pour transformer les lettres en chiffres (A=10, B=11...)
else
{
$NumIban+=$ibanI[$comptIBAN]
}
$comptIBAN++
}
#cela fait un nombre de 30 chiffres : trop pour powershell, je découpe donc les 9 premiers caractères :
if ("$($NumIBAN.Substring(0,9)%97)$($NumIBAN.Substring(9,$NumIBAN.Length-9))"%97 -eq 1)
{return $true}
else
{return $false}
}
} #fin fonction vérification IBAN / Stéphane RABANY 2018

View file

@ -0,0 +1,60 @@
@'
"Country","Length","Example"
"Albania",28,"AL47212110090000000235698741"
"Andorra",24,"AD1200012030200359100100"
"Austria",20,"AT611904300235473201"
"Belgium",16,"BE68539007547034"
"Bosnia and Herzegovina",20,"BA391290079401028494"
"Bulgaria",22,"BG80BNBG96611020345678"
"Croatia",21,"HR1210010051863000160"
"Cyprus",28,"CY17002001280000001200527600"
"Czech Republic",24,"CZ6508000000192000145399"
"Denmark",18,"DK5000400440116243"
"Estonia",20,"EE382200221020145685"
"Faroe Islands",18,"FO1464600009692713"
"Finland",18,"FI2112345600000785"
"France",27,"FR1420041010050500013M02606"
"Georgia",22,"GE29NB0000000101904917"
"Germany",22,"DE89370400440532013000"
"Gibraltar",23,"GI75NWBK000000007099453"
"Greece",27,"GR1601101250000000012300695"
"Greenland",18,"GL8964710001000206"
"Hungary",28,"HU42117730161111101800000000"
"Iceland",26,"IS140159260076545510730339"
"Ireland",22,"IE29AIBK93115212345678"
"Italy",27,"IT60X0542811101000000123456"
"Kosovo",20,"XK051212012345678906"
"Latvia",21,"LV80BANK0000435195001"
"Liechtenstein",21,"LI21088100002324013AA"
"Lithuania",20,"LT121000011101001000"
"Luxembourg",20,"LU280019400644750000"
"Macedonia",19,"MK07300000000042425"
"Malta",31,"MT84MALT011000012345MTLCAST001S"
"Moldova",24,"MD24AG000225100013104168"
"Monaco",27,"MC5813488000010051108001292"
"Montenegro",22,"ME25505000012345678951"
"Netherlands",18,"NL91ABNA0417164300"
"Norway",15,"NO9386011117947"
"Poland",28,"PL27114020040000300201355387"
"Portugal",25,"PT50000201231234567890154"
"Romania",24,"RO49AAAA1B31007593840000"
"San Marino",27,"SM86U0322509800000000270100"
"Serbia",22,"RS35260005601001611379"
"Slovakia",24,"SK3112000000198742637541"
"Slovenia",19,"SI56191000000123438"
"Spain",24,"ES9121000418450200051332"
"Sweden",24,"SE3550000000054910000003"
"Switzerland",21,"CH9300762011623852957"
"Ukraine",29,"UA573543470006762462054925026"
"United Kingdom",22,"GB29NWBK60161331926819"
'@ -split "`r`n" | Set-Content -Path .\IBAN.csv -Force
$ibans = foreach ($iban in Import-Csv -Path .\IBAN.csv)
{
$iban | Select-Object -Property Country,
@{Name='Code' ; Expression={$iban.Example.Substring(0,2)}},
@{Name='Length'; Expression={[int]$iban.Length}},
Example
}
$ibans

View file

@ -0,0 +1,10 @@
$regex = [regex]'[a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{6}[0-9]{5}([a-zA-Z0-9]?){0,16}'
foreach ($iban in $ibans)
{
[PSCustomObject]@{
Country = $iban.Country
Example = $iban.Example
IsValid = $regex.IsMatch($iban.Example)
}
}