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

20050504: pqact name parsing...



>From: Gerry Creager n5jxs <address@hidden>
>Organization: AATLT, Texas A&M University
>Keywords: 200505041734.j44HY5P3020036

>Hi, folks,
>
>I've got a problem trying to parse an incoming product with a name like:
>
>UFL-ANAe005-g221-20050601T1200-20050604T0600-20050604T0600

Gerry,

Using your name above (and don't know about ANA vs WANA in your message and
your changing the one "-" to "_" in the 3 date string), it can be parsed like:

EXP     
^(UFL)-(ANAe005)-(g221)-(2005)(06)(01)(T1200)-(20050604T0600-20050604T0600)$
        FILE    data/SCOOP/\1/\4/\5/\6/W\2-\1_\4\5\6\7_\8_\3_Z.gz

depending on what you know about the various field names, you can use wild card,
or sets "[]". For example, if the first field is always 3 characters, use 
([A-Z][A-Z][A-Z]).

Steve Chiswell




>
>And file it in some manner like:
>
>FILE 
>data/SCOOP/UFL/yyyy/mm/dd/WANAe005-UFL_yyyymmddT1200_20050604T0600-20050604T06
> 00_g221_Z.gz
>
>where yyyymmdd is the first timestamp in the filename, and we have to 
>parse and use all the others.
>
>I'm running out of regex wildcard matches for this, as far as I can 
>tell.  Suggestions?
>
>thanks, Gerry
>-- 
>Gerry Creager -- address@hidden
>Texas Mesonet -- AATLT, Texas A&M University   
>Cell: 979.229.5301 Office: 979.458.4020
>FAX:  979.847.8578 Pager:  979.228.0173
>Office: 903A Eller Bldg, TAMU, College Station, TX 77843
>
--
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publicly available
through the web.  If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.