improve simple callsign checking
[spider.git] / perl / DXUtil.pm
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