[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[LDM #LGL-289314]: regex issue
- Subject: [LDM #LGL-289314]: regex issue
- Date: Thu, 24 May 2007 18:36:32 -0600
Gerry,
> This is really more pqact-related. I'm trying the following, with <tab>
> for the whitespace:
> EXP ^WMM5v370-TAM_(........)T(.*)DOMAIN3_Z.bin.gz
> FILE -close
> data/TAMU/MM5/\1/WMM5v370-TAM_\1T\2DOMAIN3_Z.bin.gz
>
> When I try to use 'regex' I get this error:
>
> -bash-3.00$ regex -s
> WMM5v370-TAM_20070524T0000_20070526T1900_20070526T2000_00DOMAIN3_Z.bin.gz
> WMM5v370-TAM_(20[0-9][0-9][01][0-9][0123][0-9])T(.*)DOMAIN3_Z.bin.gz
> -bash: syntax error near unexpected token `('
>
> Could you help with the application of a clue-by-4, please?
The characters in the string "()[]*" are metacharacters to the
shell, so if you want to use them, then you should quote the
argument that contains them:
regex -s
WMM5v370-TAM_20070524T0000_20070526T1900_20070526T2000_00DOMAIN3_Z.bin.gz
'WMM5v370-TAM_(20[0-9][0-9][01][0-9][0123][0-9])T(.*)DOMAIN3_Z.bin.gz'
Regards,
Steve Emmerson
Ticket Details
===================
Ticket ID: LGL-289314
Department: Support LDM
Priority: Normal
Status: Closed