Path: utzoo!attcan!uunet!decwrl!nsc!taux01!avi From: avi@taux01.nsc.com (Avi Bloch) Newsgroups: comp.editors Subject: Re: vi: search for or go to a line not of length n Message-ID: <4769@taux01.nsc.com> Date: 26 Sep 90 12:59:34 GMT References: <62420017@hpl-opus.HP.COM> Reply-To: avi@taux01.UUCP (Avi Bloch) Organization: National Semiconductor (IC) Ltd, Israel Lines: 22 In article <62420017@hpl-opus.HP.COM> steinbac@hpl-opus.HP.COM (Gunter Steinbach) writes: >> / hpl-opus:comp.editors / lee@chsun1.uchicago.edu (dwight lee) / >> Also, is there a way for a search in vi to be inverted? ie "search for the >> next line which does not begin with a capital M". This would also be good for >> checking on mangled uuencoded files. > >That one is easy: >/^[^M]/ > This doesn't always work, since an empty line is also a line 'which does not begin with a capital M' and that search pattern will only find lines with at least 1 character on it. I don't of any way that will also catch empty lines. Any takers? -- Avi Bloch National Semiconductor (Israel) 6 Maskit st. P.O.B. 3007, Herzlia 46104, Israel Tel: (972) 52-522263 avi@taux01.nsc.com