On Wed, Mar 19, 2003 at 04:17:54AM +0100, Axel Schlicht wrote:
> 
> cat x | sed -ne '/.*\/Names\/[^/][^/]*/p'
> cat x | sed -ne '/.*\/Names\/[^/][^/]*$/p' # with EOL 
> cat x | sed -ne '/.*\/Names\/[^/]\+/p'     # with + (masked)
> cat x | sed -ne '/\/Names\/[^/]\+/p'       # prefix omitted  
> 
> all yield
> blaba/Names/aaa
> blaba/Names/aaa/1
> blaba/names/aaa/2
> blaba/Names/bb
> blaba/Names/bb/3
> blaba/Names/Ccccc/5
> blaba/Names/Cc&DD
> blaba/Names/Cc&DD/2
> i. e., the whole list, altho no / may follow the /Name/.
> Maybe somebody can shed some light on this murky matter.

I am not a regular expressions expert but this works:


zsh % cat x | sed -ne '/.*Name\/*[^/]*$/p'
blaba/Name/aaa
blaba/Name/bb
blaba/Name/Cc&DD

Regards
Johann
-- 
Johann Spies          Telefoon: 021-808 4036
Informasietegnologie, Universiteit van Stellenbosch

     " And God shall wipe away all tears from their eyes; 
      and there shall be no more death, neither sorrow, nor 
      crying, neither shall there be any more pain: for the 
      former things are passed away."               
                          Revelations 21:4 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to