Change callsign suffix handling somewhat
authorDirk Koopman <djk@tobit.co.uk>
Fri, 22 Mar 2024 17:26:43 +0000 (17:26 +0000)
committerDirk Koopman <djk@tobit.co.uk>
Fri, 22 Mar 2024 17:26:43 +0000 (17:26 +0000)
Changes
perl/Prefix.pm

diff --git a/Changes b/Changes
index ef87e440cd8824648542ea62b90f3dc7626dc2c2..3b8920033c8f4ba927e64579e330eca72741e7a2 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,6 @@
+22Mar24======================================================================
+1. Change the processing of trailing callsigns slightly so that /1 /2 etc are
+   retained, but the /P /M /A /MM etc are removed.
 20Mar24======================================================================
 1. Has it really been so long since the last update?
 2. Since forever, mainly because filtering was done very early on in
index 83b0ac40c9b870650db4a436fc5db4264658a1fc..d7552cb65f0d712b53ddc34ed017463a67cd8fc4 100644 (file)
@@ -274,7 +274,7 @@ LM: foreach $call (split /,/, $calls) {
 
                # remove any /0-9 /P /A /M /MM /AM suffixes etc
                if (@parts > 1) {
-                       @parts = grep { !/^\d+$/ && !/^[PABM]$/ && !/^(?:|AM|MM|BCN|JOTA|SIX|WEB|NET|Q\w+)$/; } @parts;
+                       pop @parts if $parts[-1] =~ /^(?:[PABM]|AM|MM|BCN|JOTA|SIX|WEB|NET|Q\w+)$/;
 
                        # can we resolve them by direct lookup
                        my $s = join('/', @parts);