|
From: | Levent Yilmaz |
Subject: | [Regexp] a regexp question |
Date: | Fri, 07 May 2004 11:55:54 -0400 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 MultiZilla/1.6.3.1d |
Hello,It sounded like a very simple problem but I couldn't come up with a solution. I was trying to do this with Basic Regexp in grep:
Find all lines which contain the word 'kitty'. But only those lines that do not have 'puppy' somewhere before 'kitty'. For instance:
my kitty is very cute but puppy is cuter than kittyWhat regular expression stands for the first line but not the second? Note that the other way is very easy, that is the lines with 'puppy' followed by 'kitty': puppy.*kitty
thank you so very much! -Levent. PS: What is all this spam on the list by the way?
[Prev in Thread] | Current Thread | [Next in Thread] |