bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: sed3028a.zip


From: Eli Zaretskii
Subject: Re: sed3028a.zip
Date: Thu, 22 Aug 2002 10:48:01 +0300

> From: address@hidden
> Date: Wed, 21 Aug 2002 17:25:11 +0800 (SGT)
> 
> I have downloaded you sed utility from http://www.cornerstonemag.com/sed/. 
> What I want to do is to remove this string: 
> 
> and "TIMESTAMP" = TO_DATE('07-JUN-2002 17:45:42', 'DD-MON-YYYY HH24:MI:SS') 
> 
> As you can see the only thing that is dynamic is the date 07-JUN-2002 and the 
> time 17:45:42. Thus, I need to use regular expressions.  
> 
> I tried to use this syntax sed 's/and "TIMESTAMP" = TO_DATE*DD-MON-YYYY 
> HH24:MI:SS\')//' redo_sqls.sql > redo_out1.sql. I thought the * will ignore 
> whenever is between TO_DATE and YYYY HH24:MI:SS') and replace the string with 
> nothing. But this comand did not change the string as I think sed could not 
> find the match. I need your expertise to see whether it is a bug or there is 
> something wrong with my regular expression.

Replace "*" with ".*", and it should do what you want.  `*' is an
operator, it works on the preceding character or parenthesized group
of characters.  If you want to say "any character zero or more
times", use `.' which means "any character".




reply via email to

[Prev in Thread] Current Thread [Next in Thread]