Fix for A45/0 callsigns

This commit is contained in:
Andreas Kristiansen
2026-01-25 17:15:36 +01:00
parent 8fa76d2ff1
commit 19675bae84
2 changed files with 10 additions and 2 deletions

View File

@@ -269,7 +269,7 @@ class Dxcc {
]);
return '';
}
if (preg_match('/^([A-Z]\d)\d$/', $matches[1])) { # e.g. A45 $c = 0
if (preg_match('/^([A-Z]\d{2,})$/', $matches[1])) { # e.g. A45 $c = 0
$prefix = $matches[1] . $c; # -> A40
} else { # Otherwise cut all numbers
if (!preg_match('/(.*[A-Z])\d+/', $matches[1], $match)) {