fix usdb, console.pl, sh/dx /p and sh/register
[spider.git] / perl / DXUtil.pm
index 73cda964733d53ea257a006ac8395af7ffe1b11c..8beb7e51e756f44270b0ddf3cfcbbf4f53792f99 100644 (file)
@@ -27,7 +27,7 @@ require Exporter;
              print_all_fields cltounix unpad is_callsign is_latlong
                         is_qra is_freq is_digits is_pctext is_pcflag insertitem deleteitem
                         is_prefix dd is_ipaddr $pi $d2r $r2d localdata localdata_mv
-                        diffms _diffms _diffus difft parraydifft is_ztime
+                        diffms _diffms _diffus difft parraydifft is_ztime basecall
             );
 
 
@@ -280,6 +280,7 @@ sub shellregex
 {
        my $in = shift;
        $in =~ s{(.)} { $patmap{$1} || "\Q$1" }ge;
+       $in =~ s|\\/|/|g;
        return '^' . $in . "\$";
 }
 
@@ -589,3 +590,9 @@ sub parraydifft
        $out =~ s/,\s*$//;
        return $out;
 }
+
+sub basecall
+{
+       my ($r) = $_[0] =~ m|^(?:[\w\d]+/)?([\w\d]+).*$|;
+       return $r;
+}