improve simple callsign checking
authorminima <minima>
Wed, 1 Nov 2000 14:02:30 +0000 (14:02 +0000)
committerminima <minima>
Wed, 1 Nov 2000 14:02:30 +0000 (14:02 +0000)
Changes
perl/DXUtil.pm

diff --git a/Changes b/Changes
index 224afe82a9e3bb0086b9a1f823c51ae40a4e3387..8807ce1a419c40a5099a9bda292bd6beaadb05a7 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,6 @@
 01Nov00=======================================================================
 1. put PC11 field 2 check back to m for pc text.
+2. improve 'simple' callsign checking
 31Oct00=======================================================================
 1. add 0x8e to the list of characters we clobber (make xterm go into graphics
 mode).
index 07e86cea4a7d5254d8415c49ddecd23f94d3b078..db1c4c7da9c952c2a8b6482dfc0c1a41669b8ea5 100644 (file)
@@ -313,7 +313,7 @@ sub unpad
 # check that a field only has callsign characters in it
 sub is_callsign
 {
-       return $_[0] =~ /^[A-Z0-9\-]+$/;
+       return $_[0] =~ /^(?:[A-Z]{1,2}\d+|\d[A-Z]\d+)[A-Z0-9\/\-]+$/;
 }
 
 # check that a PC protocol field is valid text