From 0ee845aaebeeb0f5a7232021d9c633a0ef2fff80 Mon Sep 17 00:00:00 2001 From: minima Date: Wed, 1 Nov 2000 14:02:30 +0000 Subject: [PATCH] improve simple callsign checking --- Changes | 1 + perl/DXUtil.pm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 -- 2.34.1