Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[LDM #OIF-246882]: pqact pattern match



Kirk,

> I use LDM to receive files from the SuomiNet project.
> File names have this form:
> SC04_17314_SC04_1471-4-18000.BNX
> 
> I created the following pqact.conf entry:
> 
> AFOS
> ^(S[A-Z][0-9][0-9]\_[0-9][0-9][0-9][0-9][0-9]\_S[A-Z][0-9][0-9]\_[0-9][0-9][0-9][0-9]-[0-9]-[0-9][0-9][0-9][0-9][0-9])(\.BNX)
> FILE    -close  /home/ldm/data/suominet/bnx/\1\2
> 
> This entry works as expected, except I also receive files like:
> SA39_UNKNOWN_SA39_1472-5-43200.BNX
> and
> SC04_17314_SC04_1471-4.BNX
> 
> I do not follow why these last two files matched the pattern.
> 
> Why does '_UNKNOWN_' match '\_[0-9][0-9][0-9][0-9][0-9]\_'
> and
> '-4.BXN' match '-[0-9]-[0-9][0-9][0-9][0-9][0-9])(\.BNX)'?

The "regex" utility, which comes with the LDM package, uses
the same pattern-matching as the "pqact" utility.  The examples
you gave work correctly on my system (Linux 2.6.23.14-115.fc8):

regex -s 'SA39_UNKNOWN_SA39_1472-5-43200.BNX' '^(S[A-Z][0-9][0-9]\_[0-9][0-9][0-9][0-9][0-9]\_S[A-Z][0-9][0-9]\_[0-9][0-9][0-9][0-9]-[0-9]-[0-9][0-9][0-9][0-9][0-9])(\.BNX)'
no match

regex -s 'SC04_17314_SC04_1471-4.BNX' '^(S[A-Z][0-9][0-9]\_[0-9][0-9][0-9][0-9][0-9]\_S[A-Z][0-9][0-9]\_[0-9][0-9][0-9][0-9]-[0-9]-[0-9][0-9][0-9][0-9][0-9])(\.BNX)'
no match

What do these commands do on your system?

> Thanks for your insight.
> 
> -- Kirk
> 
> *****************************************
> * Kirk L. Holub                         *
> * NOAA Earth System Research Laboratory *
> * 325 Broadway                          *
> * Bldg 33/2B143/x6642                   *
> * Boulder, CO  80305-3328               *
> *                                       *
> * Global Systems Division               *
> * Forecast Applications Branch          *
> *                                       *
> * 303-497-6642 (W)   303-748-7262 (FAX) *
> * 303-748-6390 (Cell)                   *
> *****************************************

Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: OIF-246882
Department: Support LDM
Priority: Normal
Status: On Hold


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Office of Programs University Corporation for Atmospheric Research (UCAR)   Unidata is a member of the UCAR Office of Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690