This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Wesley,
We received the following NAM 218 product:
Jul 18 20:14:52 notifyme[20472] INFO: 259276 20180718194035.741 CONDUIT 027
data/nccf/com/nam/prod/nam.20180718/nam.t18z.awip1202.tm00.grib2
!grib2/ncep/NAM_84/#000/201807181800F002/OMEG/700 hPa PRES! 000027
This product won't match your regular expression pattern:
^(data/nccf/com/nam.*awip12) !(.*)!
because of the space in the pattern after the "awip12".
Because you're only using the first parenthetical sub-string, you could
probably use a simpler pattern like "^(data/nccf/com/nam.*awip12)".
If you must match on the stuff between the exclamation points, then try a
pattern like "^(data/nccf/com/nam.*awip12).*!.*!"
You can test regular expression patterns with the LDM's regex(1) utility:
$ regex -s
'data/nccf/com/nam/prod/nam.20180718/nam.t18z.awip1202.tm00.grib2
!grib2/ncep/NAM_84/#000/201807181800F002/OMEG/700 hPa PRES! 000027'
'^(data/nccf/com/nam.*awip12) !(.*)!'
no match
$ regex -s
'data/nccf/com/nam/prod/nam.20180718/nam.t18z.awip1202.tm00.grib2
!grib2/ncep/NAM_84/#000/201807181800F002/OMEG/700 hPa PRES! 000027'
'^(data/nccf/com/nam.*awip12)'
match
$ regex -s
'data/nccf/com/nam/prod/nam.20180718/nam.t18z.awip1202.tm00.grib2
!grib2/ncep/NAM_84/#000/201807181800F002/OMEG/700 hPa PRES! 000027'
'^(data/nccf/com/nam.*awip12).*!.*!'
match
Regards,
Steve Emmerson
Ticket Details
===================
Ticket ID: ERJ-637034
Department: Support LDM
Priority: Normal
Status: Closed
===================
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.