gabriel rosenkoetter on Fri, 2 Feb 2001 00:20:15 -0500 |
On Thu, Feb 01, 2001 at 07:41:41PM -0500, MaD dUCK wrote: > how can i create a regexp which will match anystring of the form > "the xxxxxx is big" > unless xxxxxx is "house" > > ? > > using [^house] obviously doesn't work... what can i use then? Um... grep 'the .* is big' | grep -v 'house' < input Not what you wanted, I'd expect, since it's not one regexp. What you're asking for, though, is conceptually two separate things. (There's no way to phrase that isn't two separate clauses... "Look for X, except when it contains Y.") But then, maybe there's some kludgey glue in sed to make this work that I'm just not 'leet enough to know. ;^> ~ g r @ eclipsed.net ______________________________________________________________________ Philadelphia Linux Users Group - http://www.phillylinux.org Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce General Discussion - http://lists.phillylinux.org/mail/listinfo/plug
|
|