From: minima Date: Wed, 1 Nov 2000 14:02:30 +0000 (+0000) Subject: improve simple callsign checking X-Git-Tag: R_1_45~64 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=0ee845aaebeeb0f5a7232021d9c633a0ef2fff80;p=spider.git improve simple callsign checking --- diff --git a/Changes b/Changes index 224afe82..8807ce1a 100644 --- 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). diff --git a/perl/DXUtil.pm b/perl/DXUtil.pm index 07e86cea..db1c4c7d 100644 --- a/perl/DXUtil.pm +++ b/perl/DXUtil.pm @@ -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